Bug#916596: iptables.postinst failure on link creation

2023-02-07 Thread Andreas Henriksson
Control: tags -1 + moreinfo

On Sun, Feb 05, 2023 at 12:08:32PM +0200, Adrian Bunk wrote:
> Control: tags -1 - moreinfo
> Control: severity -1 serious
> 
> On Fri, Dec 28, 2018 at 02:59:26PM +0100, Arturo Borrero Gonzalez wrote:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA512
> > 
> > Control: tag -1 moreinfo
> > 
> > On Sun, 16 Dec 2018 13:14:19 +0100 Olivier  wrote:
> > > Package: iptables Version: 1.8.2-2+b1 Severity: important
> > > 
> > > Dear Maintainer,
> > > 
> > > Issue occure during iptables:i386 1.8.2-2 -> 1.8.2-2+b1 upgrade.
> > > 
> > > /var/lib/dpkg/info/iptables.postinst fail with message:
> > > 
> > > ln: failed to create symbolic link ''$'\t''
> > > /sbin/iptables-save': No such file or directory
> > > 
> > 
> > I can't reproduce the issue:
> >...
> > I didn't try in i386 because I don't have any machine (virtual or
> > physical) with that arch, maybe is a architecture specific bug in the
> > shell? Hard to believe to say the least.
> >...
> 
> I can reproduce the problem in a current amd64 unstable chroot.

Great, can you provide some information regarding how?

Could you for example modify iptables.prerm to check what the content of
$IFS is when you reproduce this?
Did any other packages maintainer script (which does things with IFS)
error out while you reproduce the problem with iptables?

I can only speculate about this issue. I don't doubt the original
reportes error message actually happened and is real, but I don't see
how.
The only possibility I see is that IFS was modified to a non-default
value which made it no longer include tab- and space-characters.
The iptables.prerm script doesn't set IFS itself, so I have to assume
it somehow inherited a dirty environment from somewhere.
Is it possible that some other packages maintainerscript code messed
with IFS without resetting it and then that environment got inherited by
iptables.prerm? If so then I think the package needs to be identified
and this bug reassigned to it
I don't think every package that has maintainerscripts should expect a
dirty environment and guard against for example a non-default IFS, but
that's kind of the only solution inside iptables that I can see have
it explicitly (un)set IFS. I however don't think that's the correct
solution, just a solution.

> 
> #1007829 was a similar problem in arptables,
> I haven't checked how these are related.

I don't see how these two are related at all.
#1007829 seems to be a simple logic error.

Regards,
Andreas Henriksson



Bug#916596: iptables.postinst failure on link creation

2023-02-05 Thread Adrian Bunk
Control: tags -1 - moreinfo
Control: severity -1 serious

On Fri, Dec 28, 2018 at 02:59:26PM +0100, Arturo Borrero Gonzalez wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
> 
> Control: tag -1 moreinfo
> 
> On Sun, 16 Dec 2018 13:14:19 +0100 Olivier  wrote:
> > Package: iptables Version: 1.8.2-2+b1 Severity: important
> > 
> > Dear Maintainer,
> > 
> > Issue occure during iptables:i386 1.8.2-2 -> 1.8.2-2+b1 upgrade.
> > 
> > /var/lib/dpkg/info/iptables.postinst fail with message:
> > 
> > ln: failed to create symbolic link ''$'\t''
> > /sbin/iptables-save': No such file or directory
> > 
> 
> I can't reproduce the issue:
>...
> I didn't try in i386 because I don't have any machine (virtual or
> physical) with that arch, maybe is a architecture specific bug in the
> shell? Hard to believe to say the least.
>...

I can reproduce the problem in a current amd64 unstable chroot.

#1007829 was a similar problem in arptables,
I haven't checked how these are related.

cu
Adrian



Bug#916596: iptables.postinst failure on link creation

2018-12-28 Thread Arturo Borrero Gonzalez
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Control: tag -1 moreinfo

On Sun, 16 Dec 2018 13:14:19 +0100 Olivier  wrote:
> Package: iptables Version: 1.8.2-2+b1 Severity: important
> 
> Dear Maintainer,
> 
> Issue occure during iptables:i386 1.8.2-2 -> 1.8.2-2+b1 upgrade.
> 
> /var/lib/dpkg/info/iptables.postinst fail with message:
> 
> ln: failed to create symbolic link ''$'\t''
> /sbin/iptables-save': No such file or directory
> 

I can't reproduce the issue:

$ sudo sh -x /var/lib/dpkg/info/iptables.postinst configure
+ set -e
+ [ configure = configure ]
+ LIST=/sbin/iptables
  /sbin/iptables-save
  /sbin/iptables-restore
  /sbin/ip6tables
  /sbin/ip6tables-save
  /sbin/ip6tables-restore
+ [ ! -e /sbin/iptables ]
+ [ ! -e /sbin/iptables-save ]
+ [ ! -e /sbin/iptables-restore ]
+ [ ! -e /sbin/ip6tables ]
+ ln -sf /usr/sbin/ip6tables /sbin/ip6tables
+ [ ! -e /sbin/ip6tables-save ]
[...]

I didn't try in i386 because I don't have any machine (virtual or
physical) with that arch, maybe is a architecture specific bug in the
shell? Hard to believe to say the least.

Or, may be a corrupted environment in your machine.
-BEGIN PGP SIGNATURE-

iQIzBAEBCgAdFiEE3ZhhqyPcMzOJLgepaOcTmB0VFfgFAlwmLD4ACgkQaOcTmB0V
Ffjz6Q//QTP2eHSzqa8ipGQyMmDvfBQmgZj2v+ZN2aGL8+vcOaxEjho52RBAi1Mu
T/66NzD8vwsct3L+zjA/pDS9LtTE6EoSFWRq/lKYuAbgXbE3vKztRdzN9YPdRklb
UuWCy9mbPXavxhQvzmXLcsIByyd1BduEsJMUMF3VWrf9lQb9FRbWjVqtfY1wP8yr
6R0XmC6fLGh1gZshHjcELr6ftDmvxIP8q9lXD/NTjS39ShT0XK6XC03njnC4Rt4z
ejFZPeOS50Mbmko1pfsNAgKsDMmHigHjs0z8f0bqLUQ1yVzIgDbTWEZLcsdP3bvk
mOum0z1kTCEtfxkT0vr507eazN+QIDygGiEIktrxn7VPrTP6Rw+WtnpdN7GDe571
ke5zvaqIBc9EExo+5IeoY3o7HPfIZZHnOQ7LNy8ZVwSXjsgP6SXcc/i51KRT4YJA
belvITm24xh7mxhdONjAaPOQSU7d2x/S3844XQ++M/gQE+Kr56aG4RkSxsntw8Gp
qg4SgyYWJbP5WykfuYtV5aiJwTs+rnN9wCpReZ8wWhTiIhuFZeCO8Z7nViKNk0Uf
Q1/uriyfuQ5zKWjxmirv4RGn3vSwjb2exNDwtykBYs/hgH/r75pd5fgcjNf26BKC
bdLCYQ9i194kBcNJcfzmsSiGGOXG1/DETTU3HVvlhenohnq2wdI=
=xxMZ
-END PGP SIGNATURE-



Bug#916596: iptables.postinst failure on link creation

2018-12-16 Thread Olivier
Package: iptables
Version: 1.8.2-2+b1
Severity: important

Dear Maintainer,

Issue occure during iptables:i386 1.8.2-2 -> 1.8.2-2+b1 upgrade.

/var/lib/dpkg/info/iptables.postinst fail with message:

ln: failed to create symbolic link ''$'\t''  /sbin/iptables-save': No such 
file or directory

The root cause is here :


LIST="/sbin/iptables
  /sbin/iptables-save
  /sbin/iptables-restore
  /sbin/ip6tables
  /sbin/ip6tables-save
  /sbin/ip6tables-restore"

for i in $LIST ; do


There are tabs before "/sbin/", so this cause "for i in $LIST" issue (tabs are 
used as a file name)

Workaround: Remove tabs:


LIST="/sbin/iptables
/sbin/iptables-save
/sbin/iptables-restore
/sbin/ip6tables
/sbin/ip6tables-save
/sbin/ip6tables-restore"


Issue are similar with #914074 and #914129, but not exactly the sames.

Thanks for your help.

Best regards,
Olivier

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (900, 'testing'), (90, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 4.18.0-2-686-pae (SMP w/4 CPU cores)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages iptables depends on:
ii  libc62.28-2
ii  libip4tc01.8.2-2+b1
ii  libip6tc01.8.2-2+b1
ii  libiptc0 1.8.2-2+b1
ii  libmnl0  1.0.4-2
ii  libnetfilter-conntrack3  1.0.7-1
ii  libnfnetlink01.0.1-3+b1
ii  libnftnl11   1.1.2-2
ii  libxtables12 1.8.2-2+b1

iptables recommends no packages.

Versions of packages iptables suggests:
ii  kmod  25-2

-- debconf information:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "fr_FR.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

-- debsums errors found:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "fr_FR.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").