debian/TODO for ledgersmb

  See also:
https://github.com/ledgersmb/pkg-ledgersmb/issues 
https://bugs.debian.org/cgi-bin/pkgreport.cgi?src=ledgersmb 
https://qa.debian.org/debcheck.php?dist=unstable&package=ledgersmb

=================================================================================
--------------------------------------------------------------------------------

- Noticed the perl requirement in debian/control being 5.10.1 but in cpanfile,
  it's actually 5.14:
requires 'perl', '5.14.0';

  - Even jessie already has 5.20
  - And even trusty has 5.18
- So it should be updated, but there's no urgency
- but actually, here in ledgersmb pkg it shouldn't be versioned at all

-----------------------------------------------------------------------------------
    - updating debconf po reference:
https://www.debian.org/doc/manuals/developers-reference/ch06.html#s6.5.2.2

    - Status of the debian/po/*po updates:

  - current total files:
$ ls *po|wc -l
15

$ ll *po
-rw-r--r-- 1 jame jame 2725 Aug 25 07:34 cs.po
-rw-r--r-- 1 jame jame 2716 Aug 25 07:34 da.po
-rw-r--r-- 1 jame jame 2883 Aug 25 07:34 de.po
-rw-r--r-- 1 jame jame 3619 Aug 25 07:34 es.po
-rw-r--r-- 1 jame jame 2920 Aug 25 07:34 fr.po
-rw-r--r-- 1 jame jame 2923 Aug 25 07:34 gl.po
-rw-r--r-- 1 jame jame 2907 Aug 25 07:34 it.po
-rw-r--r-- 1 jame jame 2848 Aug 25 07:34 ja.po
-rw-r--r-- 1 jame jame 2954 Aug 25 07:34 nl.po
-rw-r--r-- 1 jame jame 2942 Aug 25 07:34 pl.po
-rw-r--r-- 1 jame jame 2865 Aug 25 07:34 pt_BR.po
-rw-r--r-- 1 jame jame 2813 Aug 25 07:34 pt.po
-rw-r--r-- 1 jame jame 3338 Aug 25 07:34 ru.po
-rw-r--r-- 1 jame jame 2710 Aug 25 07:34 sk.po
-rw-r--r-- 1 jame jame 2848 Aug 25 07:34 sv.po



  - These are the deb po updates that are already done, as of 1.5.21+ds-2:
* Updated the debconf debian/po/es.po file.
* Updated the debconf debian/po/cs.po file. (Closes: #905098)
* Updated the debconf debian/po/da.po file. (Closes: #905893)
* Updated the debconf debian/po/de.po file. (Closes: #906576)
* Updated the debconf debian/po/fr.po file. (Closes: #905637)
* Updated the debconf debian/po/nl.po file. (Closes: #906061)
* Updated the debconf debian/po/pt_BR.po file. (Closes: #905870)
* Updated the debconf debian/po/ru.po file. (Closes: #904708)


  - 9 Nov: have received a possible update for gl.po.
  - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911542
  - These still need to have the translations updated: (7)
-rw-r--r-- 1 jame jame 2923 Aug 25 07:34 gl.po
-rw-r--r-- 1 jame jame 2907 Aug 25 07:34 it.po
-rw-r--r-- 1 jame jame 2848 Aug 25 07:34 ja.po
-rw-r--r-- 1 jame jame 2942 Aug 25 07:34 pl.po
-rw-r--r-- 1 jame jame 2813 Aug 25 07:34 pt.po
-rw-r--r-- 1 jame jame 2710 Aug 25 07:34 sk.po
-rw-r--r-- 1 jame jame 2848 Aug 25 07:34 sv.po



--------------------------------------------------------------------------------
- Basic upstream testing has been enabled.  Will need to add configuration etc
  as necessary in order to use autopkgtest for package as-installed testing.

--------------------------------------------------------------------------------

- The setting of the password for the dbadmin user is now done automatially
  on a new install and when requested during a 'dpkg-reconfigure' of the pkg.
  Should it actually be optional during a pkg reconfigure? If so, (re)add a
  stanza to the template file about it and functionality as necessary to
  config & postinst scripts. (Re-add by reversing commit 98db30a63?)

- Use the web proxy selection for a case statement for each of the selections
  in the postinst script?

- The preinst script checks if the old apache config file is present. Gets rid
  of it if is. The presence of that file is also a good indication that it's
  going though an update install, the previously installed version is pre 1.5.x,
  and that apache is already installed because of old version of installed 
  package. A good reason to change the default proxy selection to 'apache'
  instead of the package 'none'?  

-> Separately;  if upgradeing from anything before 1.5.0, apache will already
 be installed because for those previous versions Apache was required. So in 
 that special case, default the question about the web proxy to Apache instead
 of None?  There is a "Set" function that can do that. And do that in the config
 script rather than the postinst script.

-> I don't think I actually added code to the script that used $LSMBPROXY when
   first tried using it, for anything in part because I'd been looking for a 
   way to get the web proxy app  installed from the script & hadn't found a way
   to do that. So will still need to add that.
   But thinking about it, there's 'dpkg --set-selections'. Haven't found an
   example of that being used in a config or postinst script but there are a
   _lot_ of pkgs to look thru & perhaps I just haven't found a good set of
   search terms.

-----------------------------------------------------------------------------------------------------
  - debian/ledgersmb.preinst
  - remove_old_config() function

It may not be needed as often but it should still be allowed for and taken care of.

These also should be removed if present.

 config file: /etc/apache2/conf.d/ledgersmb.conf
 symlink:     /etc/ledgersmb/ledgersmb-httpd-2.0-2.2.conf

-----------------------------------------------------------------------------------------------------
    - If these turn out to have worked for the ledgersmb-1.5 pkg, adapt from there:
 
  - note that the service file name as been changed for 1.6.x
$ git ci -m "Change how 'WORKING_DIRECTORY' is set in starman-ledgersmb.service patch."

-----------------------------------------------------------------------------------------------------
 The ledgersmb.org site has v1.5 screen shots at https://ledgersmb.org/content/screenshots-15;
 update debian for them, at least after I get the ledgersmb pkg updated and uploaded
 at http://screenshots.debian.net/package/ledgersmb.  (And get the old 1.3 
 screenshots removed.)  If the 1.6 screen shots area available, use those.

------------------------------------------------------------------------------

- Discussed in IRC some of the permission fix issues.  Erik took care of
fixing many of them in both master & 1.5 so when the next release comes out
will need to run a build of both ledgersmb & ledgersmb-1.6 without the 
fixes enabled in order to check how the fix permissions stanza in d/rules
can be updated for that.

  - Referance also https://github.com/ledgersmb/LedgerSMB/issues/2899 which 
  for the creation of a test in upstream that checks for such permission issues.

- As of the packageing for 1.6.6, this is what is in the override_dh_fixperms
  stanza has:
<-->dh_fixperms
<-->chmod +x debian/ledgersmb/usr/share/ledgersmb/bin/drop-roles.pl
<-->chmod +x debian/ledgersmb/usr/share/ledgersmb/sql/modules/reload_modules.sh
<-->chmod +x debian/ledgersmb/usr/share/ledgersmb/utils/notify_short/config.pl
<-->chmod +x debian/ledgersmb/usr/share/ledgersmb/utils/notify_short/listener.pl
<-->chmod +x debian/ledgersmb/usr/share/ledgersmb/utils/process_queue/config.pl.default
<-->chmod +x debian/ledgersmb/usr/share/ledgersmb/utils/process_queue/process_queue.pl
<-->chmod +x debian/ledgersmb/usr/share/ledgersmb/utils/devel/ledgersmb-server-development.psgi

-------------------------------------------------------------------------------
https://github.com/ledgersmb/LedgerSMB/issues/2900
Although Debian (and others) do now use systemd by default, it does still
support sysvinit init.d scripts as well, so providing at least an example
init.d sysvinit startup script for starman-ledgersmb would be quite useful.

- In the mean time, added an initial version of an example of the file,
which will need to be removed when it becomes available in upstream.
(In order to test how it works, one needs to use something that has been
changed to use sysvinit by default instead of systemd, which is the default
on stretch now and was also availalbe on jessie.)

-------------------------------------------------------------------------------
    - debian/adm/config-lsmb-db-user.sh

- Use only the postgresql tools, like createuser, to set the user name and 
password for the LSMB DB Admin user.  David G pointed out that using SQL
can allow the unencrypted password to prehaps show up in logs, etc, which
is a security concern.  One thing though; the sql is used to check for
the existance of the user and then update or recreate.  Don't know if
that can be duplicated just using the postgresql tools directly.
- Take out defaulting for doing the SQL 'ALTER' instead of a 'CREATE'
if the LSMB DBAdmin user already exits.  It was pointed out by both David
and Erik that they really don't think it's a good idea to reset that password
by default when, for instance, upgradeing the package;  which is what it did
if doing the configure was enabled.  Add option to reset the password if the
user ID already exists, but not by default; would have to explicitly agree
to it, each time, and that agreement isn't saved so the question gets asked
each time and by default is not to do the reset.

  - see also: admin user password change
https://github.com/ledgersmb/LedgerSMB/issues/2717

-----------------------------------------------------------------------------------
      - Lintian results for 1.6.6-2~2 (UNRELEASED)

I: ledgersmb source: no-complete-debconf-translation
  - https://lintian.debian.org/tags/no-complete-debconf-translation.html

I: ledgersmb source: testsuite-autopkgtest-missing
  - https://lintian.debian.org/tags/testsuite-autopkgtest-missing.html

I: ledgersmb: systemd-service-file-missing-documentation-key lib/systemd/system/ledgersmb.service
  - https://lintian.debian.org/tags/systemd-service-file-missing-documentation-key.html

I: ledgersmb: package-contains-documentation-outside-usr-share-doc usr/share/ledgersmb/UI/js-src/README.md
I: ledgersmb: package-contains-documentation-outside-usr-share-doc usr/share/ledgersmb/conf/README.md
I: ledgersmb: package-contains-documentation-outside-usr-share-doc usr/share/ledgersmb/conf/systemd/README.md
I: ledgersmb: package-contains-documentation-outside-usr-share-doc usr/share/ledgersmb/locale/README.md
I: ledgersmb: package-contains-documentation-outside-usr-share-doc usr/share/ledgersmb/sql/modules/README
I: ledgersmb: package-contains-documentation-outside-usr-share-doc usr/share/ledgersmb/sql/upgrade/README
I: ledgersmb: package-contains-documentation-outside-usr-share-doc usr/share/ledgersmb/utils/notify_short/README
  - https://lintian.debian.org/tags/package-contains-documentation-outside-usr-share-doc.html

N: 3 tags overridden (3 info)


  - Using 'lintian -IE --pedantic --show-overrides' on a 1:6.6+ds-2~2 test build
    included the following results:
P: ledgersmb source: file-contains-trailing-whitespace debian/changelog (line 371)
P: ledgersmb source: file-contains-trailing-whitespace debian/changelog (line 470)
P: ledgersmb source: file-contains-trailing-whitespace debian/changelog (line 516)
P: ledgersmb source: file-contains-trailing-whitespace debian/changelog (line 783)
P: ledgersmb source: file-contains-trailing-whitespace debian/changelog (line 787)
P: ledgersmb source: file-contains-trailing-whitespace debian/changelog (line 811)
P: ledgersmb source: file-contains-trailing-whitespace debian/changelog (line 823)
P: ledgersmb source: file-contains-trailing-whitespace debian/changelog (line 1004)
P: ledgersmb source: file-contains-trailing-whitespace debian/rules (line 32)
P: ledgersmb source: package-uses-old-debhelper-compat-version 9
P: ledgersmb source: insecure-copyright-format-uri http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
I: ledgersmb source: testsuite-autopkgtest-missing
X: ledgersmb source: upstream-metadata-file-is-missing
I: ledgersmb source: public-upstream-key-not-minimal upstream/signing-key.asc has 1 extra signature(s) for keyid 39A629558DA0AF10
I: ledgersmb: package-contains-documentation-outside-usr-share-doc usr/share/ledgersmb/UI/js-src/README.md
I: ledgersmb: package-contains-documentation-outside-usr-share-doc usr/share/ledgersmb/conf/README.md
I: ledgersmb: package-contains-documentation-outside-usr-share-doc usr/share/ledgersmb/conf/systemd/README.md
I: ledgersmb: package-contains-documentation-outside-usr-share-doc usr/share/ledgersmb/locale/README.md
I: ledgersmb: package-contains-documentation-outside-usr-share-doc usr/share/ledgersmb/sql/modules/README
I: ledgersmb: package-contains-documentation-outside-usr-share-doc usr/share/ledgersmb/sql/upgrade/README
I: ledgersmb: package-contains-documentation-outside-usr-share-doc usr/share/ledgersmb/utils/devel/README.md
I: ledgersmb: package-contains-documentation-outside-usr-share-doc usr/share/ledgersmb/utils/devel/critic_html/README
I: ledgersmb: package-contains-documentation-outside-usr-share-doc usr/share/ledgersmb/utils/diagnostics/t/README.md
I: ledgersmb: package-contains-documentation-outside-usr-share-doc usr/share/ledgersmb/utils/lib/README.md
I: ledgersmb: package-contains-documentation-outside-usr-share-doc usr/share/ledgersmb/utils/notify_short/README
N: Upstream includes empty directory intentionally, as standard locations for custom scripts
O: ledgersmb: package-contains-empty-directory usr/share/ledgersmb/bin/custom/
N: Upstream includes empty directory intentionally, as standard locations for custom scripts
O: ledgersmb: package-contains-empty-directory usr/share/ledgersmb/lib/LedgerSMB/Reconciliation/CSV/Formats/
N: Upstream includes empty directory intentionally, as standard locations for custom scripts
O: ledgersmb: package-contains-empty-directory usr/share/ledgersmb/lib/LedgerSMB/Scripts/custom/
I: ledgersmb: systemd-service-file-missing-documentation-key lib/systemd/system/ledgersmb.service


-----------------------------------------------------------------------------------
- A debian/po debconf Japanese translation has been provided. Currently,
there is no LSMB locale/po/ja.po file. Checked System|Lanaguage|List
Languages in LSMB 1.3.40: "ja" is not in the default list. It's also not
listed as an available language when editing templates, and presumably
those lists come from the same source. It can be added manually using
System|Language|Add Language. Debian bug # 831688.
-----------------------------------------------------------------------------------

- Currently have texlive-latex-recommended as a Recommends but that pulls a lot of
of other pkgs in and takes a lot of space, and is only there regarding being able
to print to PDF.  Options for how to that have/are being discussed, like modules
or apps to print from html to pdf.  Once that has been implenmented, move the
texlive requirement from Recommends to Suggests and add some info about it to the
README.Debian
- Note that what has been discussed for an alternate default for printing has
been 'wkhtml2pdf'.

-----------------------------------------------------------------------------------
  - docomentation related changes that were done for ledgersmb-1.5 pkg:
$ git ci -m "Add 'db-changes' to and also sort the debian/ledgersmb.docs file."
$ git ci -m "Add a debian/ledgersmb-1.5.doc-base.coding-standard file."
$ git ci -m "Add a debian/ledgersmb-1.5.doc-base.db-changes file."


- Upstream uses pdflatex to create the distribution LedgerSMB-manual.pdf from
the source file doc/manual/LedgerSMB-manual.tex. Use the same source file to
create an HTML version?

- Create an HTML and/or PDF file of doc/templateing/templating-guide.tex? And
then register it with doc-base?

- Instead of a sym link to point to the /etc/ledgersmb config file(s), 
patch config file to add '/etc/' to the config file setting? (Would
the apache config also need to be updated to allow that?)

-------------------------------------------------------------------------------
  - Interesting enough; this is available for Config::Model
https://metacpan.org/release/Config-Model-Systemd
  -> It's been in Debian since Stretch
  https://packages.debian.org/source/sid/libconfig-model-systemd-perl

  - So if there is a need to do a debconf update for the service file, will it
  be able to do so?
- Being able to update the service file for the LSMB Starman port from the 
postinstall script may be quite useful. Investigate?

-----------------------------------------------------------------------------------


 -- Robert James Clay <jame@rocasa.us>  Mon, 12 Nov 2018 04:31 -0500
