[aur-general] pkgbuild with after installation Customizations
Hi, I have made a package for espeakup that pulls the git version and installs it. It has a systemd file so that espeakup can start with boot. After installation is complete though, the system file needs to be edited to set the voice the user wants to use, e.g. en-us, en-sc, etc. Can I just put a standard prompt in the pkgbuild? E.g. read -p "Enter the voice file you want to use, e.g. en-us: " voice Currently I just set it to en-us by default which means the person who uses it would have to edit the systemd file to change it. Thanks Storm -- -- Registered Linux user number 508465: https://linuxcounter.net/user/508465.html My blog, Thoughts of a Dragon: http://www.stormdragon.us/ My last.fm profile: http://www.last.fm/user/stormdragon2976 "I am your soul insane" Slayer - Gemini
Best practice is to write the systemd file without a default. Espeakup uses the default British English Espeak voice if no voice is specified. Then if the user wishes to change the voice, he/she can add a voice option on the ExecStart command line. Hope this helps. ~Kyle http://kyle.tk/ -- "Kyle? ... She calls her cake, Kyle?" Out of This World, season 2 episode 21 - "The Amazing Evie"
On 10/27/13 at 11:23pm, Storm Dragon wrote:
I have made a package for espeakup that pulls the git version and installs it. It has a systemd file so that espeakup can start with boot. After installation is complete though, the system file needs to be edited to set the voice the user wants to use, e.g. en-us, en-sc, etc. Can I just put a standard prompt in the pkgbuild? E.g. read -p "Enter the voice file you want to use, e.g. en-us: " voice Currently I just set it to en-us by default which means the person who uses it would have to edit the systemd file to change it. Thanks Storm
Did you create the service file for it? If so, then you could just make it something like espeakup@.service and then just put a "%I" in the ExecStart command where the voice/language would typically go. That way the user could enable something like espeakup@en-sc.service. If it is an upstream provided service file, then you might just want to put a postinstall note that this needs to be set. -- Curtis Shimamoto sugar.and.scruffy [at] gmail.com
Responding to a message written by Curtis Shimamoto: # Did you create the service file for it? If so, then you could just make it # something like espeakup@.service and then just put a "%I" in the ExecStart # command where the voice/language would typically go. That way the user could # enable something like espeakup@en-sc.service. Even better. I had seen that done for devices and virtual private networks, but I had never actually tried it for other command line options. It occurs to me that since I had a major hand in writing the espeakup systemd service that is included with the package in the community repo that I could have added that option, but my goal at the time was to get it ready for systemd as quickly as possible, and since no default was specified in the init script, I just used the espeakup command with no optional arguments. Oh well, I'd say it's probably too late to send in a patch for that now that everyone using espeakup knows to systemctl enable espeakup.service ~Kyle http://kyle.tk/ -- "Kyle? ... She calls her cake, Kyle?" Out of This World, season 2 episode 21 - "The Amazing Evie"
Hi, I changed the service file, but it is using the default voice instead of the voice I set. Can you take a look at it and let me know what is wrong? This is just the one from the version in community adapted for the git package. The attached file contains the service file, the pkgbuild, the install file and the speakup.conf for modules-load.d. Thanks Storm On Sun, Oct 27, 2013 at 08:39:55PM -0700, Curtis Shimamoto wrote:
On 10/27/13 at 11:23pm, Storm Dragon wrote:
I have made a package for espeakup that pulls the git version and installs it. It has a systemd file so that espeakup can start with boot. After installation is complete though, the system file needs to be edited to set the voice the user wants to use, e.g. en-us, en-sc, etc. Can I just put a standard prompt in the pkgbuild? E.g. read -p "Enter the voice file you want to use, e.g. en-us: " voice Currently I just set it to en-us by default which means the person who uses it would have to edit the systemd file to change it. Thanks Storm
Did you create the service file for it? If so, then you could just make it something like espeakup@.service and then just put a "%I" in the ExecStart command where the voice/language would typically go. That way the user could enable something like espeakup@en-sc.service.
If it is an upstream provided service file, then you might just want to put a postinstall note that this needs to be set.
-- Curtis Shimamoto sugar.and.scruffy [at] gmail.com
-- -- Registered Linux user number 508465: https://linuxcounter.net/user/508465.html My blog, Thoughts of a Dragon: http://www.stormdragon.us/ How many Internet mail list subscribers does it take to change a lightbulb? http://goo.gl/eO4PJ "The leather armies have prevailed, the Phantom Lord has never failed. Smoke is lifting from the ground, the rising volume metal sound." Metallica - Phantom Lord
Storm Dragon wrote:
Hi, I changed the service file, but it is using the default voice instead of the voice I set. Can you take a look at it and let me know what is wrong? This is just the one from the version in community adapted for the git package. The attached file contains the service file, the pkgbuild, the install file and the speakup.conf for modules-load.d. Thanks Storm
Hi, While looking at the posted files I noticed a few things. The first is that the executable and some other files were installed under /usr/local/, even though the service file was expecting the usual directories. The use of "%I" in the file appears to be correct. I have attached a makepkg source archive with a modified PKGBUILD. Please read through it and note the various changes. Feel free to ask if you have any questions. I may have made a mistake. Note as well that I have not tested the package. I have not even looked at the speakup.conf file. I have simply edited the PKGBUILD to conform to current guidelines and checked that files appear in sane places in the $pkgdir. Regards, Xyne
Hi, I couldn't find anything attached. I am new to mutt, so I'm probably not in the right menu or something. Thanks Storm On Mon, Oct 28, 2013 at 10:39:44PM +0000, Xyne wrote:
Storm Dragon wrote:
Hi, I changed the service file, but it is using the default voice instead of the voice I set. Can you take a look at it and let me know what is wrong? This is just the one from the version in community adapted for the git package. The attached file contains the service file, the pkgbuild, the install file and the speakup.conf for modules-load.d. Thanks Storm
Hi,
While looking at the posted files I noticed a few things. The first is that the executable and some other files were installed under /usr/local/, even though the service file was expecting the usual directories. The use of "%I" in the file appears to be correct.
I have attached a makepkg source archive with a modified PKGBUILD. Please read through it and note the various changes. Feel free to ask if you have any questions. I may have made a mistake.
Note as well that I have not tested the package. I have not even looked at the speakup.conf file. I have simply edited the PKGBUILD to conform to current guidelines and checked that files appear in sane places in the $pkgdir.
Regards, Xyne
-- -- Registered Linux user number 508465: https://linuxcounter.net/user/508465.html My blog, Thoughts of a Dragon: http://www.stormdragon.us/ Follow me on Twitter: http://www.twitter.com/stormdragon2976 "Shine glorious we ride, we stare into the blackened sky. Save the last command, the virtue blinding." DragonForce - The Last Journey Home
On 2013-10-28 20:06 -0400 Storm Dragon wrote:
Hi, I couldn't find anything attached. I am new to mutt, so I'm probably not in the right menu or something. Thanks Storm
Apparently I forgot to attach it or attached it to the wrong email. It should be attached now. I had not kept the local copy so I had to quickly remake it, but I think it includes all the original changes. Regards, Xyne
Xyne wrote:
Apparently I forgot to attach it or attached it to the wrong email.
It should be attached now. I had not kept the local copy so I had to quickly remake it, but I think it includes all the original changes.
Ok, either the list is stripping a 1.3 kiB attachment, or my mail client is giving me the finger. I have upload a copy to my site: http://xyne.archlinux.ca/tmp/pkgbuilds/espeakup-git-v0.71.115.gd95ee07-1.src... If that link dies (e.g. due to an update that changes the version), scan the parent directory: http://xyne.archlinux.ca/tmp/pkgbuilds/
Hi, Thanks for the PKGBUILD. I installed it and everything went fine with the install, but when I tried to start the service it failed. Systemctl status espeakup@en-us.service gives the following error: espeakup@en-us.service Loaded: not-found (Reason: No such file or directory) Active: failed (Result: start-limit) since Mon 2013-10-28 23:15:16 EDT; 12min ago Thanks Storm On Tue, Oct 29, 2013 at 02:43:59AM +0000, Xyne wrote:
Xyne wrote:
Apparently I forgot to attach it or attached it to the wrong email.
It should be attached now. I had not kept the local copy so I had to quickly remake it, but I think it includes all the original changes.
Ok, either the list is stripping a 1.3 kiB attachment, or my mail client is giving me the finger.
I have upload a copy to my site: http://xyne.archlinux.ca/tmp/pkgbuilds/espeakup-git-v0.71.115.gd95ee07-1.src...
If that link dies (e.g. due to an update that changes the version), scan the parent directory: http://xyne.archlinux.ca/tmp/pkgbuilds/
-- -- Registered Linux user number 508465: https://linuxcounter.net/user/508465.html My blog, Thoughts of a Dragon: http://www.stormdragon.us/ Get paid to read email: http://is.gd/feRiB "The leather armies have prevailed, the Phantom Lord has never failed. Smoke is lifting from the ground, the rising volume metal sound." Metallica - Phantom Lord
On 10/28/13 at 11:31pm, Storm Dragon wrote:
Hi, Thanks for the PKGBUILD. I installed it and everything went fine with the install, but when I tried to start the service it failed.
Systemctl status espeakup@en-us.service gives the following error: espeakup@en-us.service Loaded: not-found (Reason: No such file or directory) Active: failed (Result: start-limit) since Mon 2013-10-28 23:15:16 EDT; 12min ago Thanks Storm
The service is trying to run /usr/local/bin/espeakup, while the binary is now located at /usr/bin/espeakup (as it should be). -- Curtis Shimamoto sugar.and.scruffy [at] gmail.com
Hi, It is working again, after I changed the service file to point at /usr/bin. But, it is still not using the correct voice, i't like whatever is in %I is being ignored. I have tried both sudo systemctl start espeakup@en-us.service as well as sudo systemctl start espeakup@en-us+m2.service and both use the default british english voice instead of the selected voice and varient. This is going to be completely awesome when it is working all the way :) Thanks Storm On Mon, Oct 28, 2013 at 08:53:21PM -0700, Curtis Shimamoto wrote:
On 10/28/13 at 11:31pm, Storm Dragon wrote:
Hi, Thanks for the PKGBUILD. I installed it and everything went fine with the install, but when I tried to start the service it failed.
Systemctl status espeakup@en-us.service gives the following error: espeakup@en-us.service Loaded: not-found (Reason: No such file or directory) Active: failed (Result: start-limit) since Mon 2013-10-28 23:15:16 EDT; 12min ago Thanks Storm
The service is trying to run /usr/local/bin/espeakup, while the binary is now located at /usr/bin/espeakup (as it should be).
-- Curtis Shimamoto sugar.and.scruffy [at] gmail.com
-- -- Registered Linux user number 508465: https://linuxcounter.net/user/508465.html My blog, Thoughts of a Dragon: http://www.stormdragon.us/ Get paid to read email: http://is.gd/feRiB "The sound of evil laughter falls around the world tonight." DragonForce - through the Fire and Flames
Hi, When I read through systemctl status for espeakup@en-us.service, it seems to be changing the - in en-us to a / which would explain the break. Is there any way to get it to leave the - alone? Here's the output: espeakup@en-us.service - Software speech output for Speakup (default voice: en/us) Loaded: loaded (/usr/lib/systemd/system/espeakup@.service; enabled) Active: active (running) since Tue 2013-10-29 02:59:01 EDT; 25s ago Process: 6249 ExecStart=/usr/bin/espeakup --default-voice=%I (code=exited, status=0/SUCCESS) Main PID: 6250 (espeakup) CGroup: /system.slice/system-espeakup.slice/espeakup@en-us.service Thanks storm On Mon, Oct 28, 2013 at 08:53:21PM -0700, Curtis Shimamoto wrote:
On 10/28/13 at 11:31pm, Storm Dragon wrote:
Hi, Thanks for the PKGBUILD. I installed it and everything went fine with the install, but when I tried to start the service it failed.
Systemctl status espeakup@en-us.service gives the following error: espeakup@en-us.service Loaded: not-found (Reason: No such file or directory) Active: failed (Result: start-limit) since Mon 2013-10-28 23:15:16 EDT; 12min ago Thanks Storm
The service is trying to run /usr/local/bin/espeakup, while the binary is now located at /usr/bin/espeakup (as it should be).
-- Curtis Shimamoto sugar.and.scruffy [at] gmail.com
-- -- Registered Linux user number 508465: https://linuxcounter.net/user/508465.html My blog, Thoughts of a Dragon: http://www.stormdragon.us/ Follow me on Twitter: http://www.twitter.com/stormdragon2976 "A sea of green will set us free" Six Feet Under - 420
You could always replace your ExecStart line with something like "ExecStart=logger %I" or "ExecStart=logger %i" etc, then check the output with "sudo journalctl -xn20". Might help in debugging. It seems your culprit is the %I variable - the %i variable is not escaped in my test service: http://pastebin.com/aYhQVgSD /Emil On Tue, Oct 29, 2013 at 4:05 PM, Storm Dragon <stormdragon2976@gmail.com>wrote:
Hi, When I read through systemctl status for espeakup@en-us.service, it seems to be changing the - in en-us to a / which would explain the break. Is there any way to get it to leave the - alone? Here's the output: espeakup@en-us.service - Software speech output for Speakup (default voice: en/us) Loaded: loaded (/usr/lib/systemd/system/**espeakup@.service; enabled) Active: active (running) since Tue 2013-10-29 02:59:01 EDT; 25s ago Process: 6249 ExecStart=/usr/bin/espeakup --default-voice=%I (code=exited, status=0/SUCCESS) Main PID: 6250 (espeakup) CGroup: /system.slice/system-espeakup.**slice/espeakup@en-us.service Thanks storm
On Mon, Oct 28, 2013 at 08:53:21PM -0700, Curtis Shimamoto wrote:
On 10/28/13 at 11:31pm, Storm Dragon wrote:
Hi, Thanks for the PKGBUILD. I installed it and everything went fine with the install, but when I tried to start the service it failed.
Systemctl status espeakup@en-us.service gives the following error: espeakup@en-us.service Loaded: not-found (Reason: No such file or directory) Active: failed (Result: start-limit) since Mon 2013-10-28 23:15:16 EDT; 12min ago Thanks Storm
The service is trying to run /usr/local/bin/espeakup, while the binary is now located at /usr/bin/espeakup (as it should be).
-- Curtis Shimamoto sugar.and.scruffy [at] gmail.com
--
-- Registered Linux user number 508465: https://linuxcounter.net/user/** 508465.html <https://linuxcounter.net/user/508465.html> My blog, Thoughts of a Dragon: http://www.stormdragon.us/ Follow me on Twitter: http://www.twitter.com/**stormdragon2976<http://www.twitter.com/stormdragon2976> "A sea of green will set us free" Six Feet Under - 420
Hi, It works! :) Thanks everyone for all the help Storm On Tue, Oct 29, 2013 at 04:49:30PM +0900, Emil Lundberg wrote:
You could always replace your ExecStart line with something like "ExecStart=logger %I" or "ExecStart=logger %i" etc, then check the output with "sudo journalctl -xn20". Might help in debugging.
It seems your culprit is the %I variable - the %i variable is not escaped in my test service: http://pastebin.com/aYhQVgSD
/Emil
On Tue, Oct 29, 2013 at 4:05 PM, Storm Dragon <stormdragon2976@gmail.com>wrote:
Hi, When I read through systemctl status for espeakup@en-us.service, it seems to be changing the - in en-us to a / which would explain the break. Is there any way to get it to leave the - alone? Here's the output: espeakup@en-us.service - Software speech output for Speakup (default voice: en/us) Loaded: loaded (/usr/lib/systemd/system/**espeakup@.service; enabled) Active: active (running) since Tue 2013-10-29 02:59:01 EDT; 25s ago Process: 6249 ExecStart=/usr/bin/espeakup --default-voice=%I (code=exited, status=0/SUCCESS) Main PID: 6250 (espeakup) CGroup: /system.slice/system-espeakup.**slice/espeakup@en-us.service Thanks storm
On Mon, Oct 28, 2013 at 08:53:21PM -0700, Curtis Shimamoto wrote:
On 10/28/13 at 11:31pm, Storm Dragon wrote:
Hi, Thanks for the PKGBUILD. I installed it and everything went fine with the install, but when I tried to start the service it failed.
Systemctl status espeakup@en-us.service gives the following error: espeakup@en-us.service Loaded: not-found (Reason: No such file or directory) Active: failed (Result: start-limit) since Mon 2013-10-28 23:15:16 EDT; 12min ago Thanks Storm
The service is trying to run /usr/local/bin/espeakup, while the binary is now located at /usr/bin/espeakup (as it should be).
-- Curtis Shimamoto sugar.and.scruffy [at] gmail.com
--
-- Registered Linux user number 508465: https://linuxcounter.net/user/** 508465.html <https://linuxcounter.net/user/508465.html> My blog, Thoughts of a Dragon: http://www.stormdragon.us/ Follow me on Twitter: http://www.twitter.com/**stormdragon2976<http://www.twitter.com/stormdragon2976> "A sea of green will set us free" Six Feet Under - 420
-- -- Registered Linux user number 508465: https://linuxcounter.net/user/508465.html My blog, Thoughts of a Dragon: http://www.stormdragon.us/ My last.fm profile: http://www.last.fm/user/stormdragon2976 "with a trunk big enough to fit three bodies in" Calabrese - Crizila
On 2013-10-28 23:31 -0400 Storm Dragon wrote:
Hi, Thanks for the PKGBUILD. I installed it and everything went fine with the install, but when I tried to start the service it failed. Systemctl status espeakup@en-us.service gives the following error: espeakup@en-us.service Loaded: not-found (Reason: No such file or directory) Active: failed (Result: start-limit) since Mon 2013-10-28 23:15:16 EDT; 12min ago Thanks Storm
I knew I had forgotten something when I tried to recreate the package. Sorry about that. I'm glad that you've got it working now. Regards, Xyne
participants (5)
-
Curtis Shimamoto
-
Emil Lundberg
-
Kyle
-
Storm Dragon
-
Xyne