Bug#905440: www.debian.org: remove "last modified" from footer

2018-08-25 Thread pareek sonu
Hey steve!

On 8/21/18, Steve McIntyre  wrote:
> On Sun, Aug 05, 2018 at 06:40:23AM +0100, Steve McIntyre wrote:
>>On Sat, Aug 04, 2018 at 07:32:17PM +0200, Laura Arjona Reina wrote:

The last commit on index.wml was in 2014, which only changed http to
https, so no real content change. In fact, the content didn't changed
since 2012 and may be out of date.
>>>
>>>The content is current.
>>>
Please just remove this useless information from every page.
>>>
>>>The date shown is the date of last build. This can be the date when
>>>something changed in the page (content or layout), in the templates
>>>used to build that page (e.g. a change in the footer), or a force
>>>rebuild for any reason.
>>>
>>>We probably change the string from "Last modified" to something else
>>>("Last build" or other wording), but I don't think that it is useless
>>>and we should remove it (I'm open to listen to other opinions,
>>>though).
>>
>>Definitely it should stay - a major part of the usefulness of many
>>pages is "can I trust this to be up to date?". If desired, I'm happy
>>to prod the wml tooling to give us more useful data ("page content
>>last modified , page built ")...?
>
> See https://salsa.debian.org/webmaster-team/webwml/merge_requests/21
> for a first attempt...
>
> --
> Steve McIntyre, Cambridge, UK.
> st...@einval.com
> "Arguing that you don't care about the right to privacy because you have
>  nothing to hide is no different than saying you don't care about free
>  speech because you have nothing to say."
>-- Edward Snowden
>
>



Bug#905440: www.debian.org: remove "last modified" from footer

2018-08-25 Thread Thomas Lange


The Perl script shown in this post sets the mtime (and atime) to
the last commit time. Works very well and needs only 7 sec for the
whole webwml repository on my notebook.

https://stackoverflow.com/questions/2458042/restore-a-files-modification-time-in-git#

I think we only need this run once, after that the perl code for
generating the footer can grab the correct mtime.
-- 
regards Thomas



Bug#905440: www.debian.org: remove "last modified" from footer

2018-08-23 Thread Laura Arjona Reina
Hi!

El 23/08/18 a las 18:28, Steve McIntyre escribió:

> 
> Except... in Thomas' original bug report he mentions the specific URL
> https://www.debian.org/women/ and that *doesn't* have the GEN_TIME
> variable set. I think we're actually looking at something else here -
> on the www-master server, what's the mtime of the file
> english/women/index.wml? If *that* is where the "Last Modified: Fri,
> Jun 1 18:42:17 UTC 2018" text is coming from, then I'll need to rework
> this change to ignore the on-disk mtime and ask git instead.
> 

yes, ls --full-time index.wml (in
www-master.debian.org:/srv/www.debian.org/webwml/english/women/)
produces this time:
2018-06-01 18:42:17.640970720 +

Cheers

-- 
Laura Arjona Reina
https://wiki.debian.org/LauraArjona



Bug#905440: www.debian.org: remove "last modified" from footer

2018-08-23 Thread Steve McIntyre
On Thu, Aug 23, 2018 at 02:06:25AM +0200, Laura Arjona Reina wrote:
>Hello all
>
>El 22/08/18 a las 01:50, Steve McIntyre escribió:
>> 
>> See https://salsa.debian.org/webmaster-team/webwml/merge_requests/21
>> for a first attempt...
>> 
>Thanks.
>I've had a look to this and made some tests.
>
>The layout and strings look fine for me. The POT/PO templates update well.
>
>The pages seem to build well (I didn't build the whole website locally
>but tried a good portion of /english and some other languages).
>
>* Looking at the resulting times shown in the html pages, and
>researching a bit, I found this in /devel/website/working:
>
>---
>GEN_TIME="true"
>Sets the date on the resulting files to the timestamp of the
>generated files, instead of the timestamp of the source file.
>---

Hmmm, yeah. I see that's used in a number of place, not all. No idea
why it's there, nor why anybody would think it's a good idea! Looking
at the list, *maybe* it's intended to be used in places where a page
is just a template and the contents are actually auto-generated, like
index files for security updates? Yeah, I think that's the
expectation.

Except... in Thomas' original bug report he mentions the specific URL
https://www.debian.org/women/ and that *doesn't* have the GEN_TIME
variable set. I think we're actually looking at something else here -
on the www-master server, what's the mtime of the file
english/women/index.wml? If *that* is where the "Last Modified: Fri,
Jun 1 18:42:17 UTC 2018" text is coming from, then I'll need to rework
this change to ignore the on-disk mtime and ask git instead.

>(I didn't know this existed)

You're not alone! :-)

>This variable is considered, in the MR, only in the webwml_built_time
>function (correct). The issue I see is that the variable is used in few
>pages (see attached file containing a list of the English page that have
>the variable set).
>
>I am not sure how to go now from here; if reviewing which pages should
>have the GEN_TIME="true" option in the header, or just forget about the
>GEN_TIME variable (delete it in every page) and simplify the functions
>in ctime.wml template to reuse the code that is run now when
>GEN_VARIABLE is not present for the webwml_modified_time, and the code
>that now is run when GEN_VARIABLE is present and has "yes", for the
>webwml_built_time.
>
>Note: there is some more code related to the GEN_VARIABLE in
>/english/template/debian/footer.wml that we would need to adapt if we
>decide to remove the variable.

Nod...

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
Into the distance, a ribbon of black
Stretched to the point of no turning back



Bug#905440: www.debian.org: remove "last modified" from footer

2018-08-21 Thread Steve McIntyre
On Sun, Aug 05, 2018 at 06:40:23AM +0100, Steve McIntyre wrote:
>On Sat, Aug 04, 2018 at 07:32:17PM +0200, Laura Arjona Reina wrote:
>>>
>>>The last commit on index.wml was in 2014, which only changed http to
>>>https, so no real content change. In fact, the content didn't changed
>>>since 2012 and may be out of date.
>>
>>The content is current.
>>
>>>Please just remove this useless information from every page.
>>
>>The date shown is the date of last build. This can be the date when
>>something changed in the page (content or layout), in the templates
>>used to build that page (e.g. a change in the footer), or a force
>>rebuild for any reason.
>>
>>We probably change the string from "Last modified" to something else
>>("Last build" or other wording), but I don't think that it is useless
>>and we should remove it (I'm open to listen to other opinions,
>>though).
>
>Definitely it should stay - a major part of the usefulness of many
>pages is "can I trust this to be up to date?". If desired, I'm happy
>to prod the wml tooling to give us more useful data ("page content
>last modified , page built ")...?

See https://salsa.debian.org/webmaster-team/webwml/merge_requests/21
for a first attempt...

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
"Arguing that you don't care about the right to privacy because you have
 nothing to hide is no different than saying you don't care about free
 speech because you have nothing to say."
   -- Edward Snowden



Re: Bug#905440: www.debian.org: remove "last modified" from footer

2018-08-11 Thread Stéphane Blondon
Hello,

Le 11/08/2018 à 21:12, Osamu Aoki a écrit :
> No not mtime but git commit time, I guess.  That is simpler and more
> robust.  There may be cleaner way but my elementally git skill can come
> up with this for path/to/file.to.check as:
> 
>  $ git log -n 1 path/to/file.to.check |sed -n -e "s/Date: *//p" 

It's even doable with:

$ git log -n 1 --pretty=format:"%ad" path/to/file.to.check


In another project, I get:
$ git log -n 1 --pretty=format:"%ad" README.rst
Thu Feb 15 02:50:37 2018 +0100

-- 
Stéphane



signature.asc
Description: OpenPGP digital signature


Bug#905440: www.debian.org: remove "last modified" from footer

2018-08-11 Thread Osamu Aoki
Hi,

On Sun, Aug 05, 2018 at 08:08:40AM +0200, Thomas Lange wrote:
> > On Sun, 5 Aug 2018 06:40:23 +0100, Steve McIntyre  
> > said:
> 
> > Definitely it should stay - a major part of the usefulness of many
> > pages is "can I trust this to be up to date?". If desired, I'm happy
> That's excatly what I tried to accomplish. Either remove it or have
> the correct information.
> 
> If we can generate this information cheaply - perfect.
> Do we just need to change the mtime of the *.wml files to the last date
> from the git logs before calling make? I could try to write a pipe of
> commands for that if you like.

No not mtime but git commit time, I guess.  That is simpler and more
robust.  There may be cleaner way but my elementally git skill can come
up with this for path/to/file.to.check as:

 $ git log -n 1 path/to/file.to.check |sed -n -e "s/Date: *//p" 

So commit your change to git repo and let build script to extract the
commit timing.  Then inject this sting while building the web page.
(Alternatively for Debian package building, we should extract date from
debian/changelog.)

You can use the "date" command to convert format to any styke (e.g.
ISO).

I didn't think this was as easy with git until Steve's comment.  I am
stll have some hung over from $id:$.

Osamu



Bug#905440: www.debian.org: remove "last modified" from footer

2018-08-05 Thread Thomas Lange
> On Sun, 5 Aug 2018 06:40:23 +0100, Steve McIntyre  said:

> Definitely it should stay - a major part of the usefulness of many
> pages is "can I trust this to be up to date?". If desired, I'm happy
That's excatly what I tried to accomplish. Either remove it or have
the correct information.

If we can generate this information cheaply - perfect.
Do we just need to change the mtime of the *.wml files to the last date
from the git logs before calling make? I could try to write a pipe of
commands for that if you like.
-- 
regards Thomas



Bug#905440: www.debian.org: remove "last modified" from footer

2018-08-04 Thread Steve McIntyre
On Sun, Aug 05, 2018 at 05:51:36AM +0200, Thomas Lange wrote:
>
>In the long run we may be able to read the git logs and have the
>accurate information of the 'last modification'. Currently that does
>not seem to be possible, because the build already takes too long.

That's actually one of the bits of information we can get quite
cheaply. Happy to play with it...

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
"You can't barbecue lettuce!" -- Ellie Crane



Bug#905440: www.debian.org: remove "last modified" from footer

2018-08-04 Thread Steve McIntyre
On Sat, Aug 04, 2018 at 07:32:17PM +0200, Laura Arjona Reina wrote:
>>
>>The last commit on index.wml was in 2014, which only changed http to
>>https, so no real content change. In fact, the content didn't changed
>>since 2012 and may be out of date.
>
>The content is current.
>
>>Please just remove this useless information from every page.
>
>The date shown is the date of last build. This can be the date when
>something changed in the page (content or layout), in the templates
>used to build that page (e.g. a change in the footer), or a force
>rebuild for any reason.
>
>We probably change the string from "Last modified" to something else
>("Last build" or other wording), but I don't think that it is useless
>and we should remove it (I'm open to listen to other opinions,
>though).

Definitely it should stay - a major part of the usefulness of many
pages is "can I trust this to be up to date?". If desired, I'm happy
to prod the wml tooling to give us more useful data ("page content
last modified , page built ")...?

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
Google-bait:   http://www.debian.org/CD/free-linux-cd
  Debian does NOT ship free CDs. Please do NOT contact the mailing
  lists asking us to send them to you.



Bug#905440: www.debian.org: remove "last modified" from footer

2018-08-04 Thread Thomas Lange
> On Sat, 04 Aug 2018 19:32:17 +0200, Laura Arjona Reina 
>  said:

> The content is current.
That's good.

> The date shown is the date of last build. This can be the date when 
something changed in the page (content or layout), in the templates used to 
build that page (e.g. a change in the footer), or a force rebuild for any 
reason.
I figured that this should be the date of the last build.

> We probably change the string from "Last modified" to something else 
("Last build" or other wording), but I don't think that it is useless and we 
should remove it (I'm open to listen to other opinions, though).
"Last build" is fine for me.

In the long run we may be able to read the git logs and have the
accurate information of the 'last modification'. Currently that does
not seem to be possible, because the build already takes too long.

-- 
regards Thomas



Bug#905440: www.debian.org: remove "last modified" from footer

2018-08-04 Thread Laura Arjona Reina



El 4 de agosto de 2018 19:32:17 CEST, Laura Arjona Reina  
escribió:

>
>We probably change the string 

I wanted to say: we probably should change the string...

Kind regards

-- 
Laura Arjona Reina
https://wiki.debian.org/LauraArjona
Sent with K-9 mail



Bug#905440: www.debian.org: remove "last modified" from footer

2018-08-04 Thread Laura Arjona Reina
Hello Thomas

El 4 de agosto de 2018 17:23:06 CEST, Thomas Lange 
 escribió:
>
>Package: www.debian.org
>
>In the footer of every page we list the date the page was last
>modified. Currently this information is completly useless, because it
>does not show a correct date. e.g.
>
>https://www.debian.org/women/
>Last Modified: Fri, Jun 1 18:42:17 UTC 2018 
>
>Let's look into the git log:
>
>The last commit on index.wml was in 2014, which only changed http to
>https, so no real content change. In fact, the content didn't changed
>since 2012 and may be out of date.
>

The content is current.

>Please just remove this useless information from every page.

The date shown is the date of last build. This can be the date when something 
changed in the page (content or layout), in the templates used to build that 
page (e.g. a change in the footer), or a force rebuild for any reason.

We probably change the string from "Last modified" to something else ("Last 
build" or other wording), but I don't think that it is useless and we should 
remove it (I'm open to listen to other opinions, though).

Kind regards
-- 
Laura Arjona Reina
https://wiki.debian.org/LauraArjona
Sent with K-9 mail



Bug#905440: www.debian.org: remove "last modified" from footer

2018-08-04 Thread Thomas Lange


Package: www.debian.org

In the footer of every page we list the date the page was last
modified. Currently this information is completly useless, because it
does not show a correct date. e.g.

https://www.debian.org/women/
Last Modified: Fri, Jun 1 18:42:17 UTC 2018 

Let's look into the git log:

The last commit on index.wml was in 2014, which only changed http to
https, so no real content change. In fact, the content didn't changed
since 2012 and may be out of date.

Please just remove this useless information from every page.

-- 
regards Thomas