<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">I know I'm definitely guilty of letting my slackbuilds slip for long periods of time.  I'm trying to prevent that moving forward, but it's really mostly a matter of getting the time to do it and remembering to do it.  So I like the auto-updating idea.  It would get many of us past the remembering to do it part of the problem.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">But it would be difficult to do.  If there were a single standard database or even standard API on project homepages that could deliver the latest version numbers, then this would start to look good.  But everyone has their own method for announcing releases with their own formats.  We'd have to parse that out of each project page.  And people change their web page layouts and formats frequently enough for this to be an ongoing headache.  If we're not updating our packages fast enough then we're not going to put even more effort into maintaining an auto-update feature.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">However, I do like the idea.  I try to automate everything I do at some point so this is an intriguing project.  Using ffmpeg as an example since it was already mentioned in this thread, an example to search for the current version number could be:</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">  > wget -qO - "${PROJECT_URL}" | grep -o "${PROJECT_NAME}-[0-9][0-9A-Za-z.]*\.tar\.xz" | sort -n | tail -1</div><div class="gmail_default" style="font-family:tahoma,sans-serif">  ffmpeg-3.2.2.tar.xz</div><div class="gmail_default" style="font-family:tahoma,sans-serif">  ></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Since we already know the version number as defined in the slackbuild, we could compare the filename with the existing one to see what the latest version is:</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br>####################################<br></div><div class="gmail_default"><div class="gmail_default"><div class="gmail_default"><font face="tahoma, sans-serif">#!/bin/bash</font></div><div class="gmail_default"><font face="tahoma, sans-serif"><br></font></div><div class="gmail_default"><font face="tahoma, sans-serif">PROJECT_NAME='ffmpeg'</font></div><div class="gmail_default"><span style="font-family:tahoma,sans-serif">PROJECT_URL='<a href="https://ffmpeg.org/download.html">https://ffmpeg.org/download.html</a>'</span></div><div class="gmail_default"><font face="tahoma, sans-serif">CURRENT_VERSION='ffmpeg-2.8.7.tar.xz'</font></div><div class="gmail_default"><font face="tahoma, sans-serif">LATEST_VERSION=$(wget -qO - "${PROJECT_URL}" | grep -o "${PROJECT_NAME}-[0-9][0-9A-Za-z.]*\.tar\.xz" | sort -n | tail -1)</font></div><div class="gmail_default"><font face="tahoma, sans-serif"><br></font></div><div class="gmail_default"><font face="tahoma, sans-serif">if [[ $(echo -e "${CURRENT_VERSION}\n${LATEST_VERSION}" | sort -n | tail -1) == ${CURRENT_VERSION} ]]; then</font></div><div class="gmail_default"><font face="tahoma, sans-serif">        echo "${PROJECT_NAME} Slackbuild is up to date."</font></div><div class="gmail_default"><font face="tahoma, sans-serif">        exit 0</font></div><div class="gmail_default"><font face="tahoma, sans-serif">else</font></div><div class="gmail_default"><font face="tahoma, sans-serif">        echo "Download new version and test slackbuild."</font></div><div class="gmail_default"><font face="tahoma, sans-serif">fi</font></div><div style="font-family:tahoma,sans-serif">####################################</div></div></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Of course, we can pull the current version from the slackbuild itself and the part where we echo "download new version . . ." would need to be replaced by code to download the new version and test the slackbuild with it or at the least, send a notification of a new update available.  We could probably put some more work into this to make something that the vast majority of slackbuilds could use.  But no doubt there will need to be a lot of unique update scripts.  But we already have a really nice slackbuild tar ball that could optionally contain an auto-updater as a support script.  So just like we have a standard template for slackbuild scripts that get modified on a case-by-case basis, we could have a standard template for an update script.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">The update script would primarily be run by the maintainer, ideally via cron or something similar, and could attempt to download and build a package with the new version.  Or it can simply send an email to notify the maintainer that a new release is available in which case it would need to track state so it doesn't spam about the same version over and over again.  Lots of possibilities.  I'll look into doing this for my slackbuilds and see what I can come up with.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 19, 2017 at 10:58 AM, Andrzej Telszewski <span dir="ltr"><<a href="mailto:atelszewski@gmail.com" target="_blank">atelszewski@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 19/01/17 19:45, David Spencer wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
As a radical idea, we could consider making some packages<br>
auto-updating. I suspect lots of perl, python, haskell and ruby could<br>
be completely automated. I bet everybody hates this idea :p<br>
<br>
</blockquote>
<br></span>
You bet ;-)<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On the other hand, George from Salix made a very good point when he<br>
recently wrote "SBo has a policy of constantly updating its contents<br>
with new versions, which in my opinion is competely against<br>
Slackware's policy (as well as our own) for stability". I do have a<br>
lot of respect for that point of view.  I think the main reasons<br>
against it are social not technical (too much work at one time for new<br>
releases, need to keep maintainers involved). Having said that, for<br>
technical reasons quite a lot of packages do need to be quite stable<br>
between releases (haskell, ffmpeg and more -- everybody on the list<br>
could probably name them).<br>
</blockquote>
<br></span>
I don't exactly agree.<br>
There are multiple situations where updating the package makes a lot of sense.<br>
Be it security, or new features that save your time.<br>
<br>
On the other side, how often do we see a breakage here?<br>
<br>
As you said, there are packages that won't see an update without very good reason.<br>
I think the crew is doing very well on that matter.<br>
<br>
When it comes to Slackware, well, it's the core of everything.<br>
The less updates it sees, the better.<br>
I guess we are all happy for Pat's policy.<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Best regards,<br>
Andrzej Telszewski</font></span><div class="HOEnZb"><div class="h5"><br>
______________________________<wbr>_________________<br>
SlackBuilds-users mailing list<br>
<a href="mailto:SlackBuilds-users@slackbuilds.org" target="_blank">SlackBuilds-users@slackbuilds.<wbr>org</a><br>
<a href="http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users" rel="noreferrer" target="_blank">http://lists.slackbuilds.org/m<wbr>ailman/listinfo/slackbuilds-us<wbr>ers</a><br>
Archives - <a href="https://lists.slackbuilds.org/pipermail/slackbuilds-users/" rel="noreferrer" target="_blank">https://lists.slackbuilds.org/<wbr>pipermail/slackbuilds-users/</a><br>
FAQ - <a href="https://slackbuilds.org/faq/" rel="noreferrer" target="_blank">https://slackbuilds.org/faq/</a><br>
<br>
</div></div></blockquote></div><br></div>