Bug#929165: How to use rm_conffile to remove files that contain empty " ", comma "," and wildcard "*"?

2022-05-16 Thread Antoine Beaupré
On 2022-05-16 19:13:45, Andreas Metzler wrote:
> On 2022-05-16 Antoine Beaupré  wrote:
>> Sorry for jumping in, but this bug report has been open for more than
>> three years now, and blocked this package from shipping with
>> bullseye. It's still blocking it from bookworm as well...
>
>> On 2021-03-14 13:53:17, Andreas Metzler wrote:
>> [...]
>>> Hello is using debhelper compat 9 though, it breaks with compat >= 12. 9
>>> does not warn, 10-11 warn without fatal error., 12 and later fail.
>
>>> So you could work around this by avoiding this dh_installdeb
>>> functionality and directly adding dpkg-maintscript-helper
>>> invocations to {post,pre}{inst,rm}.
>
>>> I will submit a bug against debhelper and Cc you.
>
>> Where is that bug report?
>
> Hello Antoine,
>
> https://bugs.debian.org/985212

I guess that bug should marked as a blocker of this one?

Maybe with Debhelper 13 (with the {Space} stuff), we could make a new
patch?

a.

-- 
Do not use your energy to worry.
Use your energy to believe, to create, to learn, to think, and to grow.
- Richard Feynman



Bug#929165: How to use rm_conffile to remove files that contain empty " ", comma "," and wildcard "*"?

2022-05-16 Thread Andreas Metzler
On 2022-05-16 Antoine Beaupré  wrote:
> Sorry for jumping in, but this bug report has been open for more than
> three years now, and blocked this package from shipping with
> bullseye. It's still blocking it from bookworm as well...

> On 2021-03-14 13:53:17, Andreas Metzler wrote:
> [...]
>> Hello is using debhelper compat 9 though, it breaks with compat >= 12. 9
>> does not warn, 10-11 warn without fatal error., 12 and later fail.

>> So you could work around this by avoiding this dh_installdeb
>> functionality and directly adding dpkg-maintscript-helper
>> invocations to {post,pre}{inst,rm}.

>> I will submit a bug against debhelper and Cc you.

> Where is that bug report?

Hello Antoine,

https://bugs.debian.org/985212

cu Andreas



Bug#929165: How to use rm_conffile to remove files that contain empty " ", comma "," and wildcard "*"?

2022-05-16 Thread Antoine Beaupré
Hi everyone!

Sorry for jumping in, but this bug report has been open for more than
three years now, and blocked this package from shipping with
bullseye. It's still blocking it from bookworm as well...

On 2021-03-14 13:53:17, Andreas Metzler wrote:
[...]
> Hello is using debhelper compat 9 though, it breaks with compat >= 12. 9
> does not warn, 10-11 warn without fatal error., 12 and later fail.
>
> So you could work around this by avoiding this dh_installdeb
> functionality and directly adding dpkg-maintscript-helper
> invocations to {post,pre}{inst,rm}.
>
> I will submit a bug against debhelper and Cc you.

Where is that bug report?

Are the tags still valid here? (moreinfo - should there be +patch?)

Thanks!

a.

-- 
The university must paint itself black, mulatto, worker anddd
peasant. If not, people will break down their doors and paint the
university the color they like.
- Ernesto "Che" Guevara



Bug#929165: How to use rm_conffile to remove files that contain empty " ", comma "," and wildcard "*"?

2021-03-14 Thread Andreas Metzler
On 2021-03-14 Hideki Yamane  wrote:
> On Sun, 7 Mar 2021 08:47:05 +0100
> Andreas Metzler  wrote:
>> I think that might be a dh_installdeb error, it seems to check whether
>> the first character is a '/', and does not account for possible quoting
>> characters.

>> This might work around this
>> rm_conffile /etc/apt/trusted.gpg.d/ubuntu-keyring-2016-dbgsym.gpg,\ \*

>  Well, * is considered as [prior-version], then.


> > BTW you should really specify [prior-version and [package].

>  Yes, but above problem prevent me to solve issue...

Hello Hideki,

just did a quick test:

download hello 2.10-2 and make (local) NMU 2.10-2.1 which adds junk:

ametzler@argenau:/tmp/hello-2.10$ dpkg --contents ../hello_2.10-2.1_amd64.deb | 
grep etc
drwxr-xr-x root/root 0 2021-03-14 13:10 ./etc/
drwxr-xr-x root/root 0 2021-03-14 13:10 ./etc/apt/
drwxr-xr-x root/root 0 2021-03-14 13:10 ./etc/apt/trusted.gpg.d/
-rw-r--r-- root/root 8 2021-03-14 13:09 
./etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cloud-archive, 
ubuntu-cloud-removed-keys.gpg
-rw-r--r-- root/root10 2021-03-14 13:10 
./etc/apt/trusted.gpg.d/ubuntu-keyring-2016-dbgsym.gpg, *

Then drop the junk again, increase version number to 2.10-3 and add a
maintsript snippet:
ametzler@argenau:/tmp/hello-2.10$ cat debian/hello.maintscript
rm_conffile '/etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cloud-archive, 
ubuntu-cloud-removed-keys.gpg' '2.10-2.2~' 'hello'
rm_conffile '/etc/apt/trusted.gpg.d/ubuntu-keyring-2016-dbgsym.gpg, *' 
'2.10-2.2~' 'hello'

Which seems to just work:
(sid)root@argenau:/# ls /etc/apt/trusted.gpg.d/u*
'/etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cloud-archive, 
ubuntu-cloud-removed-keys.gpg'
'/etc/apt/trusted.gpg.d/ubuntu-keyring-2016-dbgsym.gpg, *'
(sid)root@argenau:/# dpkg -i /tmp/hello_2.10-3_amd64.deb
(Reading database ... 21100 files and directories currently installed.)
Preparing to unpack /tmp/hello_2.10-3_amd64.deb ...
Unpacking hello (2.10-3) over (2.10-2.1) ...
Setting up hello (2.10-3) ...
Removing obsolete conffile 
/etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cloud-archive, 
ubuntu-cloud-removed-keys.gpg ...
Removing obsolete conffile 
/etc/apt/trusted.gpg.d/ubuntu-keyring-2016-dbgsym.gpg, * ...
Processing triggers for install-info (6.7.0.dfsg.2-6) ...
Processing triggers for man-db (2.9.4-2) ...
(sid)root@argenau:/# ls /etc/apt/trusted.gpg.d/u*
ls: cannot access '/etc/apt/trusted.gpg.d/u*': No such file or directory

Hello is using debhelper compat 9 though, it breaks with compat >= 12. 9
does not warn, 10-11 warn without fatal error., 12 and later fail.

So you could work around this by avoiding this dh_installdeb
functionality and directly adding dpkg-maintscript-helper
invocations to {post,pre}{inst,rm}.

I will submit a bug against debhelper and Cc you.

cu Andreas
-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'



Bug#929165: How to use rm_conffile to remove files that contain empty " ", comma "," and wildcard "*"?

2021-03-13 Thread Hideki Yamane
Hi Andreas,

 Thanks for your suggestion.

On Sun, 7 Mar 2021 08:47:05 +0100
Andreas Metzler  wrote:
> I think that might be a dh_installdeb error, it seems to check whether
> the first character is a '/', and does not account for possible quoting
> characters.
> 
> This might work around this
> rm_conffile /etc/apt/trusted.gpg.d/ubuntu-keyring-2016-dbgsym.gpg,\ \*

 Well, * is considered as [prior-version], then.


> BTW you should really specify [prior-version and [package].

 Yes, but above problem prevent me to solve issue...


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#929165: How to use rm_conffile to remove files that contain empty " ", comma "," and wildcard "*"?

2021-03-06 Thread Andreas Metzler
On 2021-03-07 Hideki Yamane  wrote:
> X-debbugs-CC: debian-de...@lists.debian.org
>  I've tried to remove files that was accidentally containts empty " ",
>  comma "," and wildcard "*" via rm_conffile from dpkg-maintscript-helper.

>  However, it returns an error like below.

> > dh_installdeb: error: The current conffile path for rm_conffile must be 
> > present and absolute, got 
> > '/etc/apt/trusted.gpg.d/ubuntu-keyring-2016-dbgsym.gpg,

>  I've specified it like below.

> > # cat debian/ubuntu-dbgsym-keyring.maintscript
> > rm_conffile '/etc/apt/trusted.gpg.d/ubuntu-keyring-2016-dbgsym.gpg, *'
[...]
>  How to use rm_conffile to remove such files that contains empty, comma
>  and * in its filenames?

Hello,

I think that might be a dh_installdeb error, it seems to check whether
the first character is a '/', and does not account for possible quoting
characters.

This might work around this
rm_conffile /etc/apt/trusted.gpg.d/ubuntu-keyring-2016-dbgsym.gpg,\ \*

BTW you should really specify [prior-version and [package].

cu Andreas
-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'



Bug#929165: How to use rm_conffile to remove files that contain empty " ", comma "," and wildcard "*"?

2021-03-06 Thread Hideki Yamane
X-debbugs-CC: debian-de...@lists.debian.org

Hi,

 I've tried to remove files that was accidentally containts empty " ",
 comma "," and wildcard "*" via rm_conffile from dpkg-maintscript-helper.

 However, it returns an error like below.

> dh_installdeb: error: The current conffile path for rm_conffile must be 
> present and absolute, got 
> '/etc/apt/trusted.gpg.d/ubuntu-keyring-2016-dbgsym.gpg,

 I've specified it like below.

> # cat debian/ubuntu-dbgsym-keyring.maintscript
> rm_conffile '/etc/apt/trusted.gpg.d/ubuntu-keyring-2016-dbgsym.gpg, *'
> rm_conffile '/etc/apt/trusted.gpg.d/ubuntu-dbgsym-removed-keys.gpg, *'



 How to use rm_conffile to remove such files that contains empty, comma
 and * in its filenames?


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp