Re: [arch-projects] [mkinitcpio] [PATCH 1/1] support zstd compression

2020-08-14 Thread Christian Hesse
Morten Linderud via arch-projects  on Fri,
2020/08/14 14:51:
> On Fri, Aug 14, 2020 at 02:44:46PM +0200, Christian Hesse wrote:
> > From: Christian Hesse 
> > 
> > Linux 5.9 supports zstd compressed initramfs, so add support here.  
> 
> Just a headsup that there is a pull-request on github with changes to
> support this.
> 
> https://github.com/archlinux/mkinitcpio/pull/35

Well, that looks pretty incomplete... In fact it just sets the compression
option and skips everything else.

But this explains why I could not find mkinitcpio in gitlab... Will send me
commit there.
-- 
main(a){char*c=/*Schoene Gruesse */"B?IJj;MEH"
"CX:;",b;for(a/*Best regards my address:*/=0;b=c[a++];)
putchar(b-1/(/*Chriscc -ox -xc - && ./x*/b/42*2-3)*42);}


pgprwbZLeyBr1.pgp
Description: OpenPGP digital signature


[arch-projects] [mkinitcpio] [PATCH 1/1] support zstd compression

2020-08-14 Thread Christian Hesse
From: Christian Hesse 

Linux 5.9 supports zstd compressed initramfs, so add support here.

Signed-off-by: Christian Hesse 
---
 PKGBUILD  | 1 +
 lsinitcpio| 4 
 man/mkinitcpio.conf.5.txt | 6 +++---
 mkinitcpio.conf   | 1 +
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/PKGBUILD b/PKGBUILD
index 3536a48..c7e1ed5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -15,6 +15,7 @@ optdepends=('xz: Use lzma or xz compression for the initramfs 
image'
 'bzip2: Use bzip2 compression for the initramfs image'
 'lzop: Use lzo compression for the initramfs image'
 'lz4: Use lz4 compression for the initramfs image'
+'zstd: Use zstd compression for the initramfs image'
 'mkinitcpio-nfs-utils: Support for root filesystem on NFS')
 backup=(etc/mkinitcpio.conf)
 
diff --git a/lsinitcpio b/lsinitcpio
index bcb4a19..4715783 100755
--- a/lsinitcpio
+++ b/lsinitcpio
@@ -113,6 +113,10 @@ detect_filetype() {
 echo 'lz4 -l'
 return
 ;;
+fd2fb528)
+echo 'zstd'
+return
+;;
 esac
 
 read -rd '' bytes < <(hexdump -n 3 -e '"%c"' "$1")
diff --git a/man/mkinitcpio.conf.5.txt b/man/mkinitcpio.conf.5.txt
index 9c8d000..9c999d7 100644
--- a/man/mkinitcpio.conf.5.txt
+++ b/man/mkinitcpio.conf.5.txt
@@ -54,9 +54,9 @@ Variables
 
Defines a program to filter the generated image through. As of linux 
2.6.38,
the kernel understands the compression formats yielded by the *gzip*, 
*bzip2*,
-   *lz4*, *lzop*, *lzma*, and *xz* compressors. If unspecified, this 
setting
-   defaults to *gzip* compression. In order to create an uncompressed 
image, define
-   this variable as *cat*.
+   *lz4*, *lzop*, *lzma*, and *xz* compressors. Compression via *zstd* was 
added
+   in linux 5.9. If unspecified, this setting defaults to *gzip* 
compression.
+   In order to create an uncompressed image, define this variable as *cat*.
 +
 It's not hard to realize that a filter such as a *tac* or *rev* will cause
 *mkinitcpio* to report success but generate a useless image. Similarly, using a
diff --git a/mkinitcpio.conf b/mkinitcpio.conf
index b926b90..ba1cce3 100644
--- a/mkinitcpio.conf
+++ b/mkinitcpio.conf
@@ -60,6 +60,7 @@ HOOKS=(base udev autodetect modconf block filesystems 
keyboard fsck)
 #COMPRESSION="xz"
 #COMPRESSION="lzop"
 #COMPRESSION="lz4"
+#COMPRESSION="zstd"
 
 # COMPRESSION_OPTIONS
 # Additional options for the compressor


[arch-projects] [mkinitcpio] [PATCH 1/1] fsck: do not complain about missing helper for tmpfs

2020-07-16 Thread Christian Hesse
From: Christian Hesse 

Within a (build) chroot we may have root on tmpfs. There is no fsck
helper for tmpfs, so do not complain.

Signed-off-by: Christian Hesse 
---
 install/fsck | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/install/fsck b/install/fsck
index d20750e..366cdbd 100644
--- a/install/fsck
+++ b/install/fsck
@@ -4,6 +4,8 @@ build() {
 local fsck= added=0
 
 add_fsck() {
+[[ $1 = tmpfs ]] && return
+
 if [[ $1 = ext[234] ]]; then
 add_binary fsck.ext4
 add_symlink /usr/bin/fsck.ext2 fsck.ext4


Re: [arch-projects] [devtools] [PATCH 1/1] make rsync use new-style compression in makepkg.conf

2020-06-17 Thread Christian Hesse
Christian Hesse  on Thu, 2020/03/26 07:16:
> From: Christian Hesse 
> 
> Our rsync package is no longer built with bundled zlib, so old-style
> compression is no longer supported.

Any news on this one?
-- 
main(a){char*c=/*Schoene Gruesse */"B?IJj;MEH"
"CX:;",b;for(a/*Best regards my address:*/=0;b=c[a++];)
putchar(b-1/(/*Chriscc -ox -xc - && ./x*/b/42*2-3)*42);}


pgpRE6r9bNUO_.pgp
Description: OpenPGP digital signature


[arch-projects] [devtools] [PATCH 1/1] make rsync use new-style compression in makepkg.conf

2020-03-25 Thread Christian Hesse
From: Christian Hesse 

Our rsync package is no longer built with bundled zlib, so old-style
compression is no longer supported.

https://www.archlinux.org/news/rsync-compatibility/
Signed-off-by: Christian Hesse 
---
 makepkg-x86_64.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/makepkg-x86_64.conf b/makepkg-x86_64.conf
index a07756c..3a1384f 100644
--- a/makepkg-x86_64.conf
+++ b/makepkg-x86_64.conf
@@ -15,7 +15,7 @@ DLAGENTS=('file::/usr/bin/curl -gqC - -o %o %u'
   'ftp::/usr/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 -o 
%o %u'
   'http::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o 
%u'
   'https::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o 
%u'
-  'rsync::/usr/bin/rsync --no-motd -z %u %o'
+  'rsync::/usr/bin/rsync --no-motd -zz %u %o'
   'scp::/usr/bin/scp -C %u %o')
 
 # Other common tools:


[arch-projects] [devtools] [PATCH 1/1] arch-nspawn: get all mirrors from host

2019-03-22 Thread Christian Hesse
From: Christian Hesse 

Now that pacconf gives us all mirrors we can use them, instead of just
the first one.

Signed-off-by: Christian Hesse 
---
 arch-nspawn.in | 14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/arch-nspawn.in b/arch-nspawn.in
index b9c846e..e68e2e7 100644
--- a/arch-nspawn.in
+++ b/arch-nspawn.in
@@ -60,17 +60,19 @@ fi
 
 pacconf_cmd=$(command -v pacman-conf || command -v pacconf)
 # shellcheck disable=2016
-host_mirror=$($pacconf_cmd --repo extra Server 2> /dev/null | head -1 | sed -r 
's#(.*/)extra/os/.*#\1$repo/os/$arch#')
+host_mirrors=($($pacconf_cmd --repo extra Server 2> /dev/null | sed -r 
's#(.*/)extra/os/.*#\1$repo/os/$arch#'))
 # shellcheck disable=2016
-[[ $host_mirror == *file://* ]] && host_mirror_path=$(echo "$host_mirror" | 
sed -r 's#file://(/.*)/\$repo/os/\$arch#\1#g')
 
 # {{{ functions
 build_mount_args() {
declare -g mount_args=()
 
-   if [[ -n $host_mirror_path ]]; then
-   mount_args+=("--bind-ro=$host_mirror_path")
-   fi
+   for host_mirror in "${host_mirrors[@]}"; do
+   if [[ $host_mirror == *file://* ]]; then
+   host_mirror_path=$(echo "$host_mirror" | sed -r 
's#file://(/.*)/\$repo/os/\$arch#\1#g')
+   mount_args+=("--bind-ro=$host_mirror_path")
+   fi
+   done
 
mount_args+=("--bind=${cache_dirs[0]}")
 
@@ -81,7 +83,7 @@ build_mount_args() {
 
 copy_hostconf () {
cp -a /etc/pacman.d/gnupg "$working_dir/etc/pacman.d"
-   echo "Server = $host_mirror" >"$working_dir/etc/pacman.d/mirrorlist"
+   printf 'Server = %s\n' "${host_mirrors[@]}" 
>"$working_dir/etc/pacman.d/mirrorlist"
 
[[ -n $pac_conf ]] && cp "$pac_conf" "$working_dir/etc/pacman.conf"
[[ -n $makepkg_conf ]] && cp "$makepkg_conf" 
"$working_dir/etc/makepkg.conf"


[arch-projects] [devtools] [PATCH 1/1] arch-nspawn: get all mirrors from host

2018-07-31 Thread Christian Hesse
From: Christian Hesse 

Now that pacconf gives us all mirrors we can use them, instead of just
the first one.

Signed-off-by: Christian Hesse 
---
 arch-nspawn.in | 17 +++--
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/arch-nspawn.in b/arch-nspawn.in
index b9c846e..661bbbd 100644
--- a/arch-nspawn.in
+++ b/arch-nspawn.in
@@ -60,17 +60,19 @@ fi
 
 pacconf_cmd=$(command -v pacman-conf || command -v pacconf)
 # shellcheck disable=2016
-host_mirror=$($pacconf_cmd --repo extra Server 2> /dev/null | head -1 | sed -r 
's#(.*/)extra/os/.*#\1$repo/os/$arch#')
+host_mirrors=($($pacconf_cmd --repo extra Server 2> /dev/null | sed -r 
's#(.*/)extra/os/.*#\1$repo/os/$arch#'))
 # shellcheck disable=2016
-[[ $host_mirror == *file://* ]] && host_mirror_path=$(echo "$host_mirror" | 
sed -r 's#file://(/.*)/\$repo/os/\$arch#\1#g')
 
 # {{{ functions
 build_mount_args() {
declare -g mount_args=()
 
-   if [[ -n $host_mirror_path ]]; then
-   mount_args+=("--bind-ro=$host_mirror_path")
-   fi
+   for host_mirror in "${host_mirrors[@]}"; do
+   if [[ $host_mirror == *file://* ]]; then
+   host_mirror_path=$(echo "$host_mirror" | sed -r 
's#file://(/.*)/\$repo/os/\$arch#\1#g')
+   mount_args+=("--bind-ro=$host_mirror_path")
+   fi
+   done
 
mount_args+=("--bind=${cache_dirs[0]}")
 
@@ -81,7 +83,10 @@ build_mount_args() {
 
 copy_hostconf () {
cp -a /etc/pacman.d/gnupg "$working_dir/etc/pacman.d"
-   echo "Server = $host_mirror" >"$working_dir/etc/pacman.d/mirrorlist"
+
+   for host_mirror in "${host_mirrors[@]}"; do
+   echo "Server = $host_mirror"
+   done >"$working_dir/etc/pacman.d/mirrorlist"
 
[[ -n $pac_conf ]] && cp "$pac_conf" "$working_dir/etc/pacman.conf"
[[ -n $makepkg_conf ]] && cp "$makepkg_conf" 
"$working_dir/etc/makepkg.conf"


Re: [arch-projects] [devtools] [PATCH v2 1/1] arch-nspawn: ignore localhost for repository mirror

2018-07-23 Thread Christian Hesse
Erich Eckner  on Mon, 2018/07/23 10:48:
> On 23.07.2018 09:48, Christian Hesse wrote:
> > Erich Eckner  on Mon, 2018/07/23 09:20:  
> >> On 23.07.2018 09:16, Christian Hesse wrote:  
> >>> From: Christian Hesse 
> >>>
> >>> My system has a mirror configuration where only the host can access a
> >>> local caching service on localhost. So ignore localhost urls.
> >>
> >> I'm curious, how this can happen / why this is desirable. Shouldn't the
> >> client be able to access the same network resources as the host?
> >> In general, my feeling is, that it is rather desired to repair the
> >> caching for the client than skipping it.  
> > 
> > The host is running pacredir [0][1], which listens on localhost and
> > redirects to hosts it found on local network. But pacredir returning 404
> > is a valid answer, it just means the file is not available in local
> > network. In this case pacman just uses the next mirror.
> > 
> > In fact pacredir is accessible form client, but things would break
> > as it has just this single server configured. There is no fallback to a
> > real mirror that has all the files required.
> > 
> > [0] https://www.archlinux.org/packages/community/x86_64/pacredir/
> > [1] https://github.com/eworm-de/pacredir#pacredir
> >   
> 
> So the core problem is, that archbuild - in contrast to pacman - only
> considers the first mirror. Wouldn't it be better to drop the "head -n1"
> then?

I think that would be fine as well. We need some more justification down the
code, though. Currently $host_mirror is expected to hold just one url.
-- 
main(a){char*c=/*Schoene Gruesse */"B?IJj;MEH"
"CX:;",b;for(a/*Best regards my address:*/=0;b=c[a++];)
putchar(b-1/(/*Chriscc -ox -xc - && ./x*/b/42*2-3)*42);}


pgpOa7_cG_lJN.pgp
Description: OpenPGP digital signature


Re: [arch-projects] [devtools] [PATCH v2 1/1] arch-nspawn: ignore localhost for repository mirror

2018-07-23 Thread Christian Hesse
Erich Eckner  on Mon, 2018/07/23 09:20:
> On 23.07.2018 09:16, Christian Hesse wrote:
> > From: Christian Hesse 
> > 
> > My system has a mirror configuration where only the host can access a
> > local caching service on localhost. So ignore localhost urls.  
> 
> I'm curious, how this can happen / why this is desirable. Shouldn't the
> client be able to access the same network resources as the host?
> In general, my feeling is, that it is rather desired to repair the
> caching for the client than skipping it.

The host is running pacredir [0][1], which listens on localhost and redirects
to hosts it found on local network. But pacredir returning 404 is a valid
answer, it just means the file is not available in local network. In this
case pacman just uses the next mirror.

In fact pacredir is accessible form client, but things would break
as it has just this single server configured. There is no fallback to a real
mirror that has all the files required.

[0] https://www.archlinux.org/packages/community/x86_64/pacredir/
[1] https://github.com/eworm-de/pacredir#pacredir
-- 
main(a){char*c=/*Schoene Gruesse */"B?IJj;MEH"
"CX:;",b;for(a/*Best regards my address:*/=0;b=c[a++];)
putchar(b-1/(/*Chriscc -ox -xc - && ./x*/b/42*2-3)*42);}


pgpr5HMYh3if6.pgp
Description: OpenPGP digital signature


[arch-projects] [devtools] [PATCH v2 1/1] arch-nspawn: ignore localhost for repository mirror

2018-07-23 Thread Christian Hesse
From: Christian Hesse 

My system has a mirror configuration where only the host can access a
local caching service on localhost. So ignore localhost urls.

Signed-off-by: Christian Hesse 
---
 arch-nspawn.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch-nspawn.in b/arch-nspawn.in
index b9c846e..020ed71 100644
--- a/arch-nspawn.in
+++ b/arch-nspawn.in
@@ -60,7 +60,7 @@ fi
 
 pacconf_cmd=$(command -v pacman-conf || command -v pacconf)
 # shellcheck disable=2016
-host_mirror=$($pacconf_cmd --repo extra Server 2> /dev/null | head -1 | sed -r 
's#(.*/)extra/os/.*#\1$repo/os/$arch#')
+host_mirror=$($pacconf_cmd --repo extra Server 2> /dev/null | grep -E -v 
'(127\.0\.0\.1|localhost)' | head -1 | sed -r 
's#(.*/)extra/os/.*#\1$repo/os/$arch#')
 # shellcheck disable=2016
 [[ $host_mirror == *file://* ]] && host_mirror_path=$(echo "$host_mirror" | 
sed -r 's#file://(/.*)/\$repo/os/\$arch#\1#g')
 


[arch-projects] [devtools] [PATCH 1/1] arch-nspawn: ignore localhost for repository mirror

2018-07-23 Thread Christian Hesse
From: Christian Hesse 

My system has a mirror configuration where only the host can access a
local caching service on localhost. So ignore localhost urls.

Signed-off-by: Christian Hesse 
---
 arch-nspawn.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch-nspawn.in b/arch-nspawn.in
index b9c846e..020ed71 100644
--- a/arch-nspawn.in
+++ b/arch-nspawn.in
@@ -60,7 +60,7 @@ fi
 
 pacconf_cmd=$(command -v pacman-conf || command -v pacconf)
 # shellcheck disable=2016
-host_mirror=$($pacconf_cmd --repo extra Server 2> /dev/null | head -1 | sed -r 
's#(.*/)extra/os/.*#\1$repo/os/$arch#')
+host_mirror=$($pacconf_cmd --repo extra Server 2> /dev/null | grep -E -v 
'(127.0.0.1|localhost)' | head -1 | sed -r 
's#(.*/)extra/os/.*#\1$repo/os/$arch#')
 # shellcheck disable=2016
 [[ $host_mirror == *file://* ]] && host_mirror_path=$(echo "$host_mirror" | 
sed -r 's#file://(/.*)/\$repo/os/\$arch#\1#g')
 


[arch-projects] [devtools] [PATCH v2 1/1] arch-nspawn: get mirror url from chroot's pacman.conf

2017-07-14 Thread Christian Hesse
From: Christian Hesse 

My system has a mirror configuration where only the host can access a
special url from pacman.conf but chroots and containers fail.

Instead of host's pacman.conf use $pac_conf or pacman.conf from chroot.
This still uses host's /etc/pacman.d/mirrorlist and should achieve the
expected results.

Signed-off-by: Christian Hesse 
---
 arch-nspawn.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch-nspawn.in b/arch-nspawn.in
index c21b2ce..bc9beb7 100644
--- a/arch-nspawn.in
+++ b/arch-nspawn.in
@@ -59,7 +59,7 @@ else
 fi
 
 # shellcheck disable=2016
-host_mirror=$(pacman --cachedir /doesnt/exist -Sddp extra/devtools 2>/dev/null 
| sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#')
+host_mirror=$(pacman --config "${pac_conf:-$working_dir/etc/pacman.conf}" 
--dbpath "$working_dir/var/lib/pacman" --cachedir /doesnt/exist -Sddp 
extra/devtools 2>/dev/null | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#')
 # shellcheck disable=2016
 [[ $host_mirror == *file://* ]] && host_mirror_path=$(echo "$host_mirror" | 
sed -r 's#file://(/.*)/\$repo/os/\$arch#\1#g')
 


Re: [arch-projects] [devtools] [PATCH 1/1] arch-nspawn: get mirror url from chroot's pacman.conf

2017-07-14 Thread Christian Hesse
Christian Hesse  on Fri, 2017/07/14 12:04:
> From: Christian Hesse 
> 
> My system has a mirror configuration where only the host can access a
> special url from pacman.conf but chroots and containers fail.
> 
> Instead of host's pacman.conf use $pac_conf or pacman.conf from chroot.
> This still uses host's /etc/pacman.d/mirrorlist and should achieve the
> expected results.

Oh, this breaks if the chroot has repositories configured that the host does
not have. *sigh*
-- 
main(a){char*c=/*Schoene Gruesse */"B?IJj;MEH"
"CX:;",b;for(a/*Best regards my address:*/=0;b=c[a++];)
putchar(b-1/(/*Chriscc -ox -xc - && ./x*/b/42*2-3)*42);}


pgpGbCMk0tWn9.pgp
Description: OpenPGP digital signature


[arch-projects] [devtools] [PATCH 1/1] makechrootpkg: try to copy with hard links

2017-07-14 Thread Christian Hesse
From: Christian Hesse 

Using rsync for a fresh copy double the amount of used memory. Instead
use cp with hard links.

Signed-off-by: Christian Hesse 
---
 makechrootpkg.in | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/makechrootpkg.in b/makechrootpkg.in
index 8d8fd05..f711201 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -127,8 +127,11 @@ sync_chroot() {
btrfs subvolume snapshot "$rootdir" "$copydir" >/dev/null ||
die "Unable to create subvolume %s" "$copydir"
else
-   mkdir -p "$copydir"
-   rsync -a --delete -q -W -x "$rootdir/" "$copydir"
+   if [[ -e "$copydir" ]]; then
+   rsync -a --delete -q -W -x "$rootdir/" "$copydir/"
+   else
+   cp --archive --link "$rootdir/" "$copydir/"
+   fi
fi
stat_done
 


[arch-projects] [devtools] [PATCH 1/1] arch-nspawn: get mirror url from chroot's pacman.conf

2017-07-14 Thread Christian Hesse
From: Christian Hesse 

My system has a mirror configuration where only the host can access a
special url from pacman.conf but chroots and containers fail.

Instead of host's pacman.conf use $pac_conf or pacman.conf from chroot.
This still uses host's /etc/pacman.d/mirrorlist and should achieve the
expected results.

Signed-off-by: Christian Hesse 
---
 arch-nspawn.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch-nspawn.in b/arch-nspawn.in
index c21b2ce..ffc7267 100644
--- a/arch-nspawn.in
+++ b/arch-nspawn.in
@@ -59,7 +59,7 @@ else
 fi
 
 # shellcheck disable=2016
-host_mirror=$(pacman --cachedir /doesnt/exist -Sddp extra/devtools 2>/dev/null 
| sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#')
+host_mirror=$(pacman --config "${pac_conf:-$working_dir/etc/pacman.conf}" 
--cachedir /doesnt/exist -Sddp extra/devtools 2>/dev/null | sed -r 
's#(.*/)extra/os/.*#\1$repo/os/$arch#')
 # shellcheck disable=2016
 [[ $host_mirror == *file://* ]] && host_mirror_path=$(echo "$host_mirror" | 
sed -r 's#file://(/.*)/\$repo/os/\$arch#\1#g')
 


Re: [arch-projects] [mkinitcpio] [PATCH 1/1] fix variable name and correctly report broken dynamic linking

2016-11-20 Thread Christian Hesse
Dave Reisner  on Sun, 2016/11/20 08:40:
> Thanks! I already have this pending in my local checkout, though.

Great, thanks!
-- 
main(a){char*c=/*Schoene Gruesse */"B?IJj;MEH"
"CX:;",b;for(a/*Best regards my address:*/=0;b=c[a++];)
putchar(b-1/(/*Chriscc -ox -xc - && ./x*/b/42*2-3)*42);}


pgpSlZotyG_AL.pgp
Description: OpenPGP digital signature


[arch-projects] [mkinitcpio] [PATCH 1/1] fix variable name and correctly report broken dynamic linking

2016-11-19 Thread Christian Hesse
From: Christian Hesse 

With broken dynamic linking an error was reported, but mkinitcpio still
exited with:

==> Image generation successful

and return code 0. This fixes the variable name, which makes mkinitcpio
exit with the correct warning:

==> WARNING: errors were encountered during the build. The image may not
be complete.

and return code 1, indicating an error.

Signed-off-by: Christian Hesse 
---
 functions | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/functions b/functions
index 7785347..14235b2 100644
--- a/functions
+++ b/functions
@@ -590,7 +590,7 @@ add_binary() {
 sodep=${BASH_REMATCH[1]}
 elif [[ $line = *'not found' ]]; then
 error "binary dependency \`%s' not found for \`%s'" "${line%% *}" 
"$1"
-(( ++builderrors ))
+(( ++_builderrors ))
 continue
 fi
 
-- 
2.10.2


[arch-projects] [devtools] [PATCH 1/1] crossrepomove: support core2community and community2core

2016-07-15 Thread Christian Hesse
From: Christian Hesse 

Signed-off-by: Christian Hesse 
---
 Makefile |  2 ++
 crossrepomove.in | 12 
 2 files changed, 14 insertions(+)

diff --git a/Makefile b/Makefile
index d93fefd..1595776 100644
--- a/Makefile
+++ b/Makefile
@@ -60,7 +60,9 @@ ARCHBUILD_LINKS = \
gnome-unstable-x86_64-build
 
 CROSSREPOMOVE_LINKS = \
+   core2community \
extra2community \
+   community2core \
community2extra
 
 BASHCOMPLETION_LINKS = \
diff --git a/crossrepomove.in b/crossrepomove.in
index d0964e3..67964a7 100644
--- a/crossrepomove.in
+++ b/crossrepomove.in
@@ -12,12 +12,24 @@ fi
 pkgbase="${1}"
 
 case $scriptname in
+   core2community)
+   source_name='packages'
+   target_name='community'
+   source_repo='core'
+   target_repo='community'
+   ;;
extra2community)
source_name='packages'
target_name='community'
source_repo='extra'
target_repo='community'
;;
+   community2core)
+   source_name='community'
+   target_name='packages'
+   source_repo='community'
+   target_repo='core'
+   ;;
community2extra)
source_name='community'
target_name='packages'
-- 
2.9.0


Re: [arch-projects] [mkinitcpio] 0.12.0 feature release review

2012-12-03 Thread Christian Hesse
Dave Reisner  on Fri, 2012/11/23 18:48:
> * Dropping support for /etc/rc.conf. This means that the keymap and
>   consolefont hooks will no longer read from /etc/rc.conf, but only
>   from /etc/vconsole.conf and /etc/locale.conf. We've been slowly
>   dropping this support in other places, and I think it makes sense
>   to do this here as well.

This is from 'man vconsole.conf':

> FONT=, FONT_MAP=, FONT_UNIMAP=
> Configures the console font, the console map and the unicode font map.

The hook looks for variable CONSOLEFONT, though. This should be just 'FONT',
no?
-- 
main(a){char*c=/*Schoene Gruesse */"B?IJj;MEH"
"CX:;",b;for(a/*Chris   get my mail address:*/=0;b=c[a++];)
putchar(b-1/(/*   gcc -o sig sig.c && ./sig*/b/42*2-3)*42);}


Re: [arch-projects] [mkinitcpio] overwrite files/symlinks

2012-07-18 Thread Christian Hesse
Dave Reisner  on Wed, 2012/07/18 13:10:
> On Wed, Jul 18, 2012 at 07:03:44PM +0200, Christian Hesse wrote:
> > Hello everybody,
> > 
> > I added a hook to the initramfs whose install script added 'uname' by
> > using add_binary. This resulted in major breakage and a kernel panicing
> > on boot.
> > 
> > I suppose this is because there is a symlink from uname to busybox - with
> > adding uname I killed the busybox binary. Is this ok by design or do we
> > want to raise an error if something like this happens?
> > 
> > I created a patch (see attachment). Does this make sense?
> 
> Nope, it doesn't make sense. We overwrite a busybox symlink in the
> shutdown hook (cp, since we need the -a flag), and this isn't a problem.

Ah, my fault...

I added my hook before base in HOOKS array. This way bin was a real directory
instead of a symlink to usr/bin.

(Note to self: Never do silly things. ;)
-- 
main(a){char*c=/*Schoene Gruesse */"B?IJj;MEH"
"CX:;",b;for(a/*Chris   get my mail address:*/=0;b=c[a++];)
putchar(b-1/(/*   gcc -o sig sig.c && ./sig*/b/42*2-3)*42);}


[arch-projects] [mkinitcpio] overwrite files/symlinks

2012-07-18 Thread Christian Hesse
Hello everybody,

I added a hook to the initramfs whose install script added 'uname' by using
add_binary. This resulted in major breakage and a kernel panicing on boot.

I suppose this is because there is a symlink from uname to busybox - with
adding uname I killed the busybox binary. Is this ok by design or do we want
to raise an error if something like this happens?

I created a patch (see attachment). Does this make sense?
-- 
main(a){char*c=/*Schoene Gruesse */"B?IJj;MEH"
"CX:;",b;for(a/*Chris   get my mail address:*/=0;b=c[a++];)
putchar(b-1/(/*   gcc -o sig sig.c && ./sig*/b/42*2-3)*42);}
diff --git a/functions b/functions
index e17e46e..364bbb2 100644
--- a/functions
+++ b/functions
@@ -437,6 +437,11 @@ add_file() {
 return 1
 fi
 
+if [[ -L "$dest" ]]; then
+error "destination is a symbolic link: \`%s'" "$dest"
+exit 1
+fi
+
 mode=${3:-$(stat -c %a "$src")}
 if [[ -z $mode ]]; then
 error "failed to stat file: \`%s'." "$src"


Re: [arch-projects] [netcfg] [GIT] netcfg network scripts repository annotated tag 2.7.2 created. 2.7.2

2012-04-03 Thread Christian Hesse
Jouke Witteveen  on Tue, 2012/04/03 12:42:
> Anymore patches for 2.7.3? Anyone?

I would like to see this included:
https://bugs.archlinux.org/task/28683

This bugs in Arch bug tracker are assigned to Rémy Oudompheng. Are you aware
of what is still pending there?
-- 
Best regards,
Chris
 O< ascii ribbon campaign
   stop html mail - www.asciiribbon.org