Bug#976696: smartmontools: install drivedb.h to /usr and copy into /var in postinst when missing/outdated

2021-01-08 Thread pn_bouteville
HI !!!
I'm continuing to receive your email 

-Message d'origine-
De : Paul Wise  
Envoyé : vendredi 8 janvier 2021 06:42
À : Dmitry Smirnov ; 976...@bugs.debian.org
Objet : Bug#976696: smartmontools: install drivedb.h to /usr and copy into /var 
in postinst when missing/outdated

On Fri, 2021-01-08 at 01:24 +1100, Dmitry Smirnov wrote:

> As you wish. I've left a TODO note in postinst regarding version check 
> and upstream needs to know about $Id value. I guess both bugs could be 
> of some use but mostly one about $Id value, especially if filed 
> upstream.

I ended up combining them both into one upstream bug:

https://www.smartmontools.org/ticket/1424

As you can see what I wrote there, it is probably best to solve most of this 
issue upstream and then re-use that for the Debian postinst.

--
bye,
pabs

https://wiki.debian.org/PaulWise



Bug#976696: smartmontools: install drivedb.h to /usr and copy into /var in postinst when missing/outdated

2021-01-07 Thread Paul Wise
On Fri, 2021-01-08 at 01:24 +1100, Dmitry Smirnov wrote:

> As you wish. I've left a TODO note in postinst regarding version
> check and upstream needs to know about $Id value. I guess both bugs
> could be of some use but mostly one about $Id value, especially if
> filed upstream.

I ended up combining them both into one upstream bug:

https://www.smartmontools.org/ticket/1424

As you can see what I wrote there, it is probably best to solve most of
this issue upstream and then re-use that for the Debian postinst.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise


signature.asc
Description: This is a digitally signed message part


Bug#976696: smartmontools: install drivedb.h to /usr and copy into /var in postinst when missing/outdated

2021-01-07 Thread bouteville pierre-noel
Could you remove my email of your list? 
I already try normal procedure in past but it doesn’t work ! 

May be due to ‘_´ in my email? 

Envoyé de mon iPhone

> Le 7 janv. 2021 à 15:27, Dmitry Smirnov  a écrit :
> 
> On Friday, 8 January 2021 12:29:06 AM AEDT Paul Wise wrote:
>>> On Thu, 2021-01-07 at 21:33 +1100, Dmitry Smirnov wrote:
>>> Makes sense, thanks. I'll probably implement unconditional
>>> replacement of "drivedb.h" at first, then think of version detection,
>>> if time allows.
>> 
>> I noticed that the file downloaded by update-smart-drivedb still does
>> not contain a valid version number in the $Id value, would you like a
>> separate bug for that and one for the version check on updates?
> 
> As you wish. I've left a TODO note in postinst regarding version check
> and upstream needs to know about $Id value. I guess both bugs could be
> of some use but mostly one about $Id value, especially if filed upstream.
> 
> Thank you.
> 
> -- 
> Kind regards,
> Dmitry Smirnov
> GPG key : 4096R/52B6BBD953968D1B
> 
> ---
> 
> The strongest argument for socialism is that it sounds good. The strongest
> argument against socialism is that it doesn't work. But those who live by
> words will always have a soft spot in their hearts for socialism because it
> sounds so good.
>-- Thomas Sowell
> 
> ---
> 
> The Seven-Step Path from Pandemic to Totalitarianism There are just seven
> steps from pandemic declaration to permanent totalitarianism – and many
> jurisdictions are about to start Step 5.
>-- 
> https://off-guardian.org/2020/04/23/the-seven-step-path-from-pandemic-to-totalitarianism



Bug#976696: smartmontools: install drivedb.h to /usr and copy into /var in postinst when missing/outdated

2021-01-07 Thread Dmitry Smirnov
On Friday, 8 January 2021 12:29:06 AM AEDT Paul Wise wrote:
> On Thu, 2021-01-07 at 21:33 +1100, Dmitry Smirnov wrote:
> > Makes sense, thanks. I'll probably implement unconditional
> > replacement of "drivedb.h" at first, then think of version detection,
> > if time allows.
> 
> I noticed that the file downloaded by update-smart-drivedb still does
> not contain a valid version number in the $Id value, would you like a
> separate bug for that and one for the version check on updates?

As you wish. I've left a TODO note in postinst regarding version check
and upstream needs to know about $Id value. I guess both bugs could be
of some use but mostly one about $Id value, especially if filed upstream.

Thank you.

-- 
Kind regards,
 Dmitry Smirnov
 GPG key : 4096R/52B6BBD953968D1B

---

The strongest argument for socialism is that it sounds good. The strongest
argument against socialism is that it doesn't work. But those who live by
words will always have a soft spot in their hearts for socialism because it
sounds so good.
-- Thomas Sowell

---

The Seven-Step Path from Pandemic to Totalitarianism There are just seven
steps from pandemic declaration to permanent totalitarianism – and many
jurisdictions are about to start Step 5.
-- 
https://off-guardian.org/2020/04/23/the-seven-step-path-from-pandemic-to-totalitarianism


signature.asc
Description: This is a digitally signed message part.


Bug#976696: smartmontools: install drivedb.h to /usr and copy into /var in postinst when missing/outdated

2021-01-07 Thread Paul Wise
On Thu, 2021-01-07 at 21:33 +1100, Dmitry Smirnov wrote:

> Makes sense, thanks. I'll probably implement unconditional
> replacement of "drivedb.h" at first, then think of version detection,
> if time allows.

I noticed that the file downloaded by update-smart-drivedb still does
not contain a valid version number in the $Id value, would you like a
separate bug for that and one for the version check on updates?

-- 
bye,
pabs

https://wiki.debian.org/PaulWise


signature.asc
Description: This is a digitally signed message part


Bug#976696: smartmontools: install drivedb.h to /usr and copy into /var in postinst when missing/outdated

2021-01-07 Thread Dmitry Smirnov
On Thursday, 7 January 2021 9:10:14 PM AEDT Paul Wise wrote:
> When the drivedb.h gets automatically updated by update-smart-drivedb
> then the next upgrade of smartmontools will get a conffile prompt that
> will have to be manually resolved by a user who won't necessarily be
> able to do that, so I don't think that this would be a good idea.
> 
> I also don't think any users need the ability to add their own entries
> to drivedb.h, generally people will only pull the latest version in.
> 
> So I think my original suggestion is the better option.

Makes sense, thanks. I'll probably implement unconditional replacement
of "drivedb.h" at first, then think of version detection, if time allows.


> Apart from the $Id version, it might be possible to rely on the dates
> returned by the VCS web servers, I haven't checked this though.

I probably won't have time to look into that in the foreseeable future...

-- 
Kind regards,
 Dmitry Smirnov
 GPG key : 4096R/52B6BBD953968D1B

---

If you are out to describe the truth, leave elegance to the tailor.
-- Albert Einstein


signature.asc
Description: This is a digitally signed message part.


Bug#976696: smartmontools: install drivedb.h to /usr and copy into /var in postinst when missing/outdated

2021-01-07 Thread Paul Wise
On Thu, 2021-01-07 at 20:58 +1100, Dmitry Smirnov wrote:

> Good idea, thanks. What do you think about installing "drivedb.h" as
> a conffile to "/etc/smartmontools"?

When the drivedb.h gets automatically updated by update-smart-drivedb
then the next upgrade of smartmontools will get a conffile prompt that
will have to be manually resolved by a user who won't necessarily be
able to do that, so I don't think that this would be a good idea.

I also don't think any users need the ability to add their own entries
to drivedb.h, generally people will only pull the latest version in.

So I think my original suggestion is the better option.

Apart from the $Id version, it might be possible to rely on the dates
returned by the VCS web servers, I haven't checked this though.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise


signature.asc
Description: This is a digitally signed message part


Bug#976696: smartmontools: install drivedb.h to /usr and copy into /var in postinst when missing/outdated

2021-01-07 Thread Dmitry Smirnov
On Monday, 7 December 2020 1:49:58 PM AEDT Paul Wise wrote:
> Please install drivedb.h to /usr and then add code to the postinst that
> will copy the /usr drivedb.h into /var when the /var drivedb.h is
> either missing or is an older copy of the file.

Good idea, thanks. What do you think about installing "drivedb.h" as a
conffile to "/etc/smartmontools"?

This way "drivedb.h" could be seamlessly updated with the package, unless
changed by user in which case user will be prompted for confirmation to 
replace the file.

-- 
Regards,
 Dmitry Smirnov
 GPG key : 4096R/52B6BBD953968D1B

---

COVID-19: PCR-based testing produces enough false positive results to make
positive results highly unreliable over a broad range of real-world
scenarios.
https://www.medrxiv.org/content/10.1101/2020.04.26.20080911v3


signature.asc
Description: This is a digitally signed message part.


Bug#976696: smartmontools: install drivedb.h to /usr and copy into /var in postinst when missing/outdated

2020-12-06 Thread Paul Wise
Package: smartmontools
Version: 7.1-1
Severity: importantUsertags: varmisuse

The current system of shipping drivedb.h in /var has some downsides:

 * debsums will complain if the user has ever ran update-smart-drivedb
 * if smartmontools is updated to a newer Debian revision after the
   user ran update-smart-drivedb, then the user's updates will be
   overwritten and reverted by the update of the package.

Please install drivedb.h to /usr and then add code to the postinst that
will copy the /usr drivedb.h into /var when the /var drivedb.h is
either missing or is an older copy of the file.

Unfortunately, while the package contains a drivedb.h with a valid
Subversion $Id value, the file downloaded by update-smart-drivedb does
not contain a valid version number in the $Id value, so it will be hard
to determine if the downloaded file is newer or older than the /usr
drivedb.h. Looking at the code this seems to be because the default URL
does not contain the $Id header and only the "sf" and "trac" URLs do
contain correct $Id headers. Since git doesn't support $Id substitution
it would probably be a good idea for upstream to add a version number
to the file that isn't dependent on Subversion $Id substitution, which
could then be used for fixing this issue.

   $ sudo apt -qq reinstall smartmontools

   $ grep -F '$Id' /var/lib/smartmontools/drivedb/drivedb.h
 { "$Id: drivedb.h 5008 2019-12-28 21:40:37Z chrfranke $",
   
   $ sudo rm -f /var/lib/smartmontools/drivedb/drivedb.h
   
   $ sudo update-smart-drivedb
   /var/lib/smartmontools/drivedb/drivedb.h updated from 
branches/RELEASE_7_0_DRIVEDB
   
   $ grep -F '$Id' /var/lib/smartmontools/drivedb/drivedb.h
 { "$Id$",
   
-- System Information:
Debian Release: bullseye/sid
  APT prefers testing-debug
  APT policy: (900, 'testing-debug'), (900, 'testing'), (800, 
'unstable-debug'), (800, 'unstable'), (790, 'buildd-unstable'), (700, 
'experimental-debug'), (700, 'experimental'), (690, 'buildd-experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.9.0-4-amd64 (SMP w/4 CPU threads)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8),
LANGUAGE=en_AU:en
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
   
Versions of packages smartmontools depends on:
ii  debianutils  4.11.2
ii  libc62.31-5
ii  libcap-ng0   0.7.9-2.2
ii  libgcc-s1 [libgcc1]  10.2.0-19
ii  libselinux1  3.1-2+b1
ii  libstdc++6   10.2.0-19
ii  libsystemd0  246.6-4
ii  lsb-base 11.1.0

smartmontools recommends no packages.

Versions of packages smartmontools suggests:
ii  bsd-mailx [mailx]  8.1.2-0.20180807cvs-2
ii  curl   7.72.0-1
ii  gpg2.2.20-1
pn  gsmartcontrol  
ii  lynx   2.9.0dev.6-1
ii  smart-notifier 0.28-6
ii  wget   1.20.3-1+b3

-- no debconf information

-- debsums errors found:
debsums: changed file /var/lib/smartmontools/drivedb/drivedb.h (from 
smartmontools package)

-- 
bye,
pabs

https://wiki.debian.org/PaulWise


signature.asc
Description: This is a digitally signed message part