From nobody Thu Mar 28 22:16:00 2024 X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail-pd0-f169.google.com (mail-pd0-f169.google.com [209.85.192.169]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 898A6DC00CA for ; Tue, 18 Nov 2014 23:39:42 +0000 (UTC) Received: by mail-pd0-f169.google.com with SMTP id fp1so6995322pdb.28 for ; Tue, 18 Nov 2014 15:39:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=Fa4fJ4L0xjEhKqzsykIDW+b8ZN1OIeG5LUK30uOK1uQ=; b=c+Pbl4XBTTYYJXbXXHD5J2OQFc428h9jDb+aDs63Qxm5GmSITYnh1QfkcnwrgKfYtX MzVVZvmPLn2ekRcYqTXMiMezXse9hmMaxNy3QS3KS891V16syrOTE2EfYxBHqkX5Ux14 x2u+4eWazecOCJ91rXRJ3L10k7L8ajtAW52J1Y5qoFQXbp7wnumIxa+Bl5t9gnGebVi2 1XAzU0VuAzdRzGvQzZrYcXtyNWB2gYRA1lojz5Guhj6U6YnMflrnza4SxGkTVwgDgZty F9Uq8EBWlpifeAAhWOfhoSFGMgAQTLnE30aG8oS66Qs19zs+bsywNhaReCKPkHXY6oMg liZQ== X-Received: by 10.68.90.225 with SMTP id bz1mr14230239pbb.153.1416353981631; Tue, 18 Nov 2014 15:39:41 -0800 (PST) Received: from newbook ([50.0.227.65]) by mx.google.com with ESMTPSA id nb3sm26576843pdb.18.2014.11.18.15.39.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Nov 2014 15:39:40 -0800 (PST) Date: Tue, 18 Nov 2014 15:39:38 -0800 From: Isaac Dunham To: alpine-devel@lists.alpinelinux.org Subject: [alpine-devel] Small scripts that may be useful for aports development Message-ID: <20141118233937.GA10937@newbook> X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="YZ5djTAD1cGYuMQK" Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, I've got a few small scripts that I find useful for working on the aports tree. The first is "git-import", a trivial script I use when I want to start creating a patch series that takes care of setting up a new git repository in one line. The second is "apkcheckin", which is probably the most useful one. It will update checksums in APKBUILD, then source the APKBUILD and make sure that all local sources get committed; at the end, it starts a text editor with a commit message that approximates the standard style (eg, "testing/physfs: new aport", "testing/otter-browser: upgrade to 0.9.04-dev46"). This avoids a few of the common mistakes in preparing patches; I wrote it after leaving some patches out of "fix build" commits. The last is "uncruft", which attempts to fix some of the more frequently encountered bits of unportability. It's worked right on the occasions when I have used it, but I'd suggest only running it when you can review the alterations made. I usually use it and git-import when I'm fixing build errors: abuild; abuild clean fetch unpack prepare git import src/*/ cd src/*/ for f in $FILELIST; do uncruft $f; done git diff cd - abuild build Hope these are useful to someone. Isaac Dunham --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=git-import #!/bin/sh usage() { echo "Usage: $0 [path/to/import]" echo "Initialize a git repo in the directory specified" exit 1 } cd "$1" || usage git init . git add . git commit -m "Initial import" --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=apkcheckin #!/bin/sh committype()( git status -s APKBUILD |grep -Fx '?? APKBUILD' >/dev/null && \ { echo "new aport"; return; } NEWVER="`sed -ne 's/^pkgver=//p' APKBUILD`" git diff |grep "^-pkgver=" >/dev/null && \ { echo "update to ${_pkgver:-$pkgver}"; return; } echo "fix package" ) if test -f APKBUILD then abuild checksum . APKBUILD COMMITMSG="`committype`" export GIT=git test -n "$DRYRUN" && export GIT=echo for f in $source do case "$f" in (*:*) ;; (*) test -e "$f" && $GIT add "$f" ;; esac done $GIT add APKBUILD _PWAPK="`pwd|sed -e 's:.*/\([^/][^/]*/[^/][^/]*\):\1:'`" cd ../.. $GIT commit -m "$_PWAPK: $COMMITMSG" --edit $@ else echo "This must be run from the directory you wish to update" fi --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=uncruft #!/bin/sh sed -e 's/__BEGIN_DECLS/#ifdef __cplusplus\nextern "C" {\n#endif/g' \ -e 's/__END_DECLS/#ifdef __cplusplus\n}\n#endif/g' \ -e 's/__\(u*int[0-9]*_t\)/\1/g' \ -e 's/sysconf(_SC_LONG_BITS)/8*sizeof(long)/g' \ -e 's/sysconf(_SC_CHAR_BITS)/8/g' \ -i "$1" --YZ5djTAD1cGYuMQK-- --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org --- From nobody Thu Mar 28 22:16:00 2024 X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 132A4DC009E for ; Wed, 19 Nov 2014 03:22:36 +0000 (UTC) Received: by mail-pa0-f44.google.com with SMTP id et14so11181894pad.3 for ; Tue, 18 Nov 2014 19:22:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=D45Cu9aD2F9YkMSDy5r9MP1EUMPGkE5sImExlCIypic=; b=viiwxhKRVs/oin+2BgMxSXp8ytvQpv/XNJkFDTHosBinlmbSM4pOOcG0aBXNmkxsu4 qQ+sOoQAg5F7g4l+POVox0fLXDGJI5xyrh6VkAZ5gYy92dwPYqolVkKVl9TZYcm3Hpbl /Lcp0ifq67k19xFwze9C3ePeWzgopHSkw22XHNI7fYUsd+b9rJy/9l7ZaKwSqWqE7KkO vis0EY196toX7reolEALl1rhGM2EU59OPBvXT6F65DQ3TaaWBnAoHj13k61Mg7sr51kg TY0HBhWKgiiWjiPv9w24knBaxXUl0imNZuLAi4Zmn8p9T3fXacLGwMCZ2kWIbTxFYnu4 9Nyw== X-Received: by 10.69.31.138 with SMTP id km10mr42727743pbd.6.1416367355910; Tue, 18 Nov 2014 19:22:35 -0800 (PST) Received: from twinpeaks.my.domain ([74.82.134.59]) by mx.google.com with ESMTPSA id jt12sm324047pbb.89.2014.11.18.19.22.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Nov 2014 19:22:35 -0800 (PST) Date: Wed, 19 Nov 2014 19:16:16 -0800 From: Orion To: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] Small scripts that may be useful for aports development Message-ID: <20141119191616.0fa76788@twinpeaks.my.domain> In-Reply-To: <20141118233937.GA10937@newbook> References: <20141118233937.GA10937@newbook> X-Mailer: Claws Mail 3.11.0 (GTK+ 2.24.23; x86_64-alpine-linux-musl) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit I'll play with them tonight. Looks good. Orion --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---