jamulus icon indicating copy to clipboard operation
jamulus copied to clipboard

create an empty default welcome file

Open mcfnord opened this issue 2 years ago • 10 comments

With this change, a Debian installation will create an empty /etc/jamulus/welcome.html file and specify it as the welcome file in the systemd default configuration.

https://github.com/orgs/jamulussoftware/discussions/3086#discussioncomment-6248420

Checklist

  • [ ] I've verified that this Pull Request follows the general code principles
  • [x] I tested my code and it does what I want
  • [ ] My code follows the style guide
  • [ ] I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • [ ] I've filled all the content above

mcfnord avatar Oct 27 '23 03:10 mcfnord

Before this gets merged, we should check how newly clients behave. Do they show an empty chat window?

ann0see avatar Nov 01 '23 22:11 ann0see

Before this gets merged, we should check how newly clients behave. Do they show an empty chat window?

Yes. There's no content change in the chat window, visually same as if there's no welcome message. Should I also test that getServerProfile returns same results in result.welcomeMessage in both cases?

mcfnord avatar Nov 02 '23 01:11 mcfnord

Should I also test that getServerProfile returns same results in result.welcomeMessage in both cases?

Yes

ann0see avatar Nov 02 '23 07:11 ann0see

John Dempsey dixit:

+sudo mkdir /etc/jamulus +sudo touch /etc/jamulus/welcome.html

@ann0see, touch won't overwrite anything. This file would behave more @appropriately with apt purge vs. apt remove, and I guess that's good @citizenship. Someday deploying default welcome file metadata could be @a thing.

No.

• sudo is not available by default but as this already runs as root… • this will not preserve user changes as per Policy if some default content is also deployed • this will need manual cleanup via postrm maintainer scripts on purge

mirabilos avatar Nov 03 '23 03:11 mirabilos

Nobody has ever expressed a great usage of metadata in the welcome file. Instead, our docs now mention bad uses for it. I tried to pitch welcome file metadata that our client reads and uses, but rdica and pljones found this idea meritless. So default content remains a fantasy. But littering a 50 byte file is no joke.

mcfnord avatar Nov 03 '23 04:11 mcfnord

It's still no problem, but we best follow the standard approach.

ann0see avatar Nov 03 '23 07:11 ann0see

This will apparently be our first usage of conffiles. How can this be? This command would seem to work the same way:

sudo systemctl edit --full jamulus-headless

It shows an editable configuration file, our ./linux/debian/jamulus-headless.service file. I hope if we change a field, then the user would get the option to merge, discard local changes, etc. But I don't see a file named conffiles.

I do see jamulus.install, and jamulus-headless.install, which maybe have the format of a conffile. jamulus-headless.install has a two-token line separated by whitespace, but the first field does not seem like a fflag (and remove-on-upgrade is the only supported flag anyway). Also, these files maybe don't contain absolute pathnames, because lines don't start with a slash, which is a requirement for conffiles.

Why don't I see a file named DEBIAN/conffile? Is that optional? Are we using this mechanism now?

(Once I was framed for a speech crime. After three nights in jail, I was taken to a room to wait for arraignment, where a judge sets the bail. One by one, each defendant was taken before the judge. As they'd return some said there was a television camera in the courtroom. Why? As we ran out of defendants, a math wiz with an opioid addiction calculated that the cameras must be for me. He said a judge can't show weakness on television. He turned to me, pointed at me, and said, "They must be here for you. You're the sacrificial lamb!"

I hope I'm not the sacrificial lamb for conffiles.)

mcfnord avatar Nov 05 '23 17:11 mcfnord

I don't know the progress of the top of my head, but I remember that the DEBIAN folder is created and populated via the shell script I mentioned. So you'd cp the empty welcome message in there.

  1. create an etc folder
  2. cp the empty file there
  3. that's already in the script, but make sure the deb is built.

ann0see avatar Nov 05 '23 21:11 ann0see

Ah stop. I believe it's just an entry in https://github.com/jamulussoftware/jamulus/blob/main/linux/debian/jamulus-headless.install

ann0see avatar Nov 05 '23 21:11 ann0see

Closing in favour of https://github.com/jamulussoftware/jamulus/issues/3281

pljones avatar May 06 '24 09:05 pljones