|
|
|
|
|
|
| Author |
Message |
Garance A Drosihn *nix forums Guru Wannabe
Joined: 21 Mar 2002
Posts: 190
|
Posted: Fri Apr 26, 2002 2:17 am Post subject:
Re: diff & patch problem with 'No newline'
|
|
|
At 12:08 AM -0400 4/26/02, Mike Barcroft wrote:
| Quote: | M. Warner Losh <imp@village.org> writes:
There's lots of software (well, OK, subversion) that
depends on the old, historical behavior. The historical
behavior of diff has been to include the "this file
doesn't end with a newline" message, not what FreeBSD
hacked it to do.
Perhaps the people working on Subversion still have time
to fix that design before too many people start using it.
Solaris 2.5.1, for instance, returns "Warning: missing
newline at end of file" on stderr for this condition.
|
They probably will fix it, by writing their own diff and
their own patch. The same way other packages fix it,
by requiring that the user install gnu-diff & gnu-patch.
I am still wondering who it is that is better off given
the standard behavior than this particular non-standard
behavior. Not "better off" in the sense that "it is
better to follow standards", but "better off" in the
sense that it is easier to get their work done, and the
sun shines brighter, and beer tastes better -- all
because the standard does not allow patch+diff to
handle this simple case of a file which is missing the
last newline character.
but that's enough from me for tonight...
--
Garance Alistair Drosehn = gad@gilead.netel.rpi.edu
Senior Systems Programmer or gad@freebsd.org
Rensselaer Polytechnic Institute or drosih@rpi.edu
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message |
|
| Back to top |
|
 |
M. Warner Losh *nix forums Guru
Joined: 22 Mar 2002
Posts: 365
|
Posted: Fri Apr 26, 2002 2:22 am Post subject:
Re: diff & patch problem with 'No newline'
|
|
|
In message: <20020425210035.A43192@espresso.q9media.com>
Mike Barcroft <mike@FreeBSD.ORG> writes:
: Garance A Drosihn <drosih@rpi.edu> writes:
: > And now, a mere two months later, I finally looked into it.
: > Changing 'diff' is trivial, but the main issue is changing
: > 'patch' to match.
: >
: > I found out that NetBSD had made changes to 'patch' so it
: > does understand these lines. I copy&pasted those changes
: > into our version, and it looks like it works right. The
: > patch is pretty straightforward, and I would like to get
: > it into our patch in for 4.6-release (along with the minor
: > change to 'diff'). Any objections?
:
: Yes. I still maintain that files without a trailing new line are not
: "text files", and should therefore be treated as binary files. Even
: if we did consider these to be "text files", no standards that I'm
: aware of define the behavior for this situation, so a non-standard
: patch utility would be required to interpret these extensions. This
: would make our generated diffs unportable in the same way as some of
: the other vendors you mentioned as having this feature.
There's lots of software (well, OK, subversion) that depends on the
old, historical behavior. The historical behavior of diff has been to
include the "this file doesn't end with a newline" message, not what
FreeBSD hacked it to do.
Warner
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message |
|
| Back to top |
|
 |
Mike Barcroft *nix forums beginner
Joined: 03 Apr 2002
Posts: 25
|
Posted: Fri Apr 26, 2002 2:34 am Post subject:
Re: diff & patch problem with 'No newline'
|
|
|
Garance A Drosihn <drosih@rpi.edu> writes:
| Quote: | Perhaps the people working on Subversion still have time
to fix that design before too many people start using it.
Solaris 2.5.1, for instance, returns "Warning: missing
newline at end of file" on stderr for this condition.
They probably will fix it, by writing their own diff and
their own patch. The same way other packages fix it,
by requiring that the user install gnu-diff & gnu-patch.
|
It occurs to me that the name of this software is very appropriate.
In any event, we'll be in good company if they decide to reject
convention and go the Linux-route.
| Quote: | I am still wondering who it is that is better off given
the standard behavior than this particular non-standard
behavior. Not "better off" in the sense that "it is
better to follow standards", but "better off" in the
sense that it is easier to get their work done, and the
sun shines brighter, and beer tastes better -- all
because the standard does not allow patch+diff to
handle this simple case of a file which is missing the
last newline character.
|
It may be that my reading of the specification is too strict. There's
nothing in the Standard that deals with this edge case, so anything
you do will be non-standard. I just happen to think, garbage in the
outputted diff is the worst possible choice.
Best regards,
Mike Barcroft
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message |
|
| Back to top |
|
 |
Mike Barcroft *nix forums beginner
Joined: 03 Apr 2002
Posts: 25
|
Posted: Fri Apr 26, 2002 3:02 am Post subject:
Re: diff & patch problem with 'No newline'
|
|
|
M. Warner Losh <imp@village.org> writes:
| Quote: | In message: <20020426000849.C43192@espresso.q9media.com
Mike Barcroft <mike@FreeBSD.ORG> writes:
: Perhaps the people working on Subversion still have time to fix that
: designo before too many people start using it. Solaris 2.5.1, for
: instance, returns "Warning: missing newline at end of file" on stderr
: for this condition.
Subversion already powers through this by forcing the user to install
gnu diff.
|
That'll teach them.
| Quote: | What does POSIX.1 say about this matter?
|
Nothing about this specific case, but:
: STDOUT
: ...
: Diff Binary Output Format
: In the POSIX locale, if one or both of the files being compared are
: not text files, an unspecified format shall be used that contains the
: pathnames of two files being compared and the string "differ".
:
: If both files being compared are text files, depending on the options
: specified, one of the following formats shall be used to write the
: differences.
: ...
....where text file is defined as:
: 3.392 Text File
:
: A file that contains characters organized into one or more lines. The
: lines do not contain NUL characters and none can exceed {LINE_MAX}
: bytes in length, including the <newline>. Although
: IEEE Std 1003.1-2001 does not distinguish between text files and
: files (see the ISO C standard), many utilities only produce
: predictable or meaningful output when operating on text files. The
: standard utilities that have such restrictions always specify text
: files in their STDIN or INPUT FILES sections.
Since the Standard doesn't allow additional output on STDOUT (with
good reason, since it breaks patch), we have two ways to conform,
either take the Solaris way and utilize:
: STDERR
: The standard error shall be used only for diagnostic messages.
....or utilize the binary output option, which I recommend since I
don't consider files without trailing newlines to be text files.
Best regards,
Mike Barcroft
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message |
|
| Back to top |
|
 |
M. Warner Losh *nix forums Guru
Joined: 22 Mar 2002
Posts: 365
|
Posted: Fri Apr 26, 2002 4:12 am Post subject:
Re: diff & patch problem with 'No newline'
|
|
|
In message: <20020426000849.C43192@espresso.q9media.com>
Mike Barcroft <mike@FreeBSD.ORG> writes:
: M. Warner Losh <imp@village.org> writes:
: > There's lots of software (well, OK, subversion) that depends on the
: > old, historical behavior. The historical behavior of diff has been to
: > include the "this file doesn't end with a newline" message, not what
: > FreeBSD hacked it to do.
:
: Perhaps the people working on Subversion still have time to fix that
: designo before too many people start using it. Solaris 2.5.1, for
: instance, returns "Warning: missing newline at end of file" on stderr
: for this condition.
Subversion already powers through this by forcing the user to install
gnu diff.
What does POSIX.1 say about this matter?
Warner
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message |
|
| Back to top |
|
 |
M. Warner Losh *nix forums Guru
Joined: 22 Mar 2002
Posts: 365
|
Posted: Fri Apr 26, 2002 5:44 am Post subject:
Re: diff & patch problem with 'No newline'
|
|
|
In message: <20020426010202.E43192@espresso.q9media.com>
Mike Barcroft <mike@FreeBSD.ORG> writes:
: M. Warner Losh <imp@village.org> writes:
: > In message: <20020426000849.C43192@espresso.q9media.com>
: > Mike Barcroft <mike@FreeBSD.ORG> writes:
: > : Perhaps the people working on Subversion still have time to fix that
: > : designo before too many people start using it. Solaris 2.5.1, for
: > : instance, returns "Warning: missing newline at end of file" on stderr
: > : for this condition.
: >
: > Subversion already powers through this by forcing the user to install
: > gnu diff.
:
: That'll teach them.
:
: > What does POSIX.1 say about this matter?
:
: Nothing about this specific case, but:
Is there a "clarification" to the standard that clarifies this? I
don't recall the name of the clarifications, but I think that Garrett
has submitted them.
Warner
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message |
|
| Back to top |
|
 |
Andrew Reilly *nix forums Guru Wannabe
Joined: 26 Apr 2002
Posts: 148
|
Posted: Fri Apr 26, 2002 9:07 am Post subject:
Re: diff & patch problem with 'No newline'
|
|
|
On Fri, 2002-04-26 at 14:12, Garance A Drosihn wrote:
| Quote: | So, that's my pitch. I feel fairly strongly that there is a
real advantage in following the lead of Linux (+anyone using
gnu-diff) and NetBSD in this matter. How strongly do others
feel that we should stick to the letter of this standard,
because they feel the standard really has the right idea?
And if you feel that way, then could you please explain to me
what the advantage is? Can you come up with any tangible
benefit of the standard which would convince a linux user to
give up this non-standard extension which they have been
using for at least five years?
|
I know that you didn't ask for it, but I'd like to voice a strong vote
of "yea" for (at least) teaching our patch to handle the "\no new line"
in diffs. I don't any more (my MB cap has been raised), but I used to
follow the wine port by rolling my own tarballs after patching with the
incremental patches that they posted on their ftp site. These were
_huge_ patch files, and almost always contained some "\no new line"
lines, that our patch would not DTRT with.
I don't care whether our diff produces those lines one way or the
other. I use vi. It doesn't believe in files without newlines at the
end.
--
Andrew
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message |
|
| Back to top |
|
 |
Garance A Drosihn *nix forums Guru Wannabe
Joined: 21 Mar 2002
Posts: 190
|
Posted: Fri Apr 26, 2002 1:50 pm Post subject:
Re: diff & patch problem with 'No newline'
|
|
|
At 9:07 PM +1000 4/26/02, Andrew Reilly wrote:
| Quote: | On Fri, 2002-04-26 at 14:12, Garance A Drosihn wrote:
So, that's my pitch. I feel fairly strongly that there is a
real advantage in following the lead of Linux (+anyone using
gnu-diff) and NetBSD in this matter.
I know that you didn't ask for it, but I'd like to voice a
strong vote of "yea" for (at least) teaching our patch to
handle the "\no new line" in diffs.
|
I'm willing to ask for any votes of "yea". It's the votes
of "nay" that I'm not asking for... :-)
--
Garance Alistair Drosehn = gad@gilead.netel.rpi.edu
Senior Systems Programmer or gad@freebsd.org
Rensselaer Polytechnic Institute or drosih@rpi.edu
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message |
|
| Back to top |
|
 |
M. Warner Losh *nix forums Guru
Joined: 22 Mar 2002
Posts: 365
|
Posted: Fri Apr 26, 2002 3:59 pm Post subject:
Re: diff & patch problem with 'No newline'
|
|
|
In message: <p0511171bb8ef272024ba@[128.113.24.47]>
Garance A Drosihn <drosih@rpi.edu> writes:
: At 9:07 PM +1000 4/26/02, Andrew Reilly wrote:
: >On Fri, 2002-04-26 at 14:12, Garance A Drosihn wrote:
: >> So, that's my pitch. I feel fairly strongly that there is a
: >> real advantage in following the lead of Linux (+anyone using
: > > gnu-diff) and NetBSD in this matter.
: >
: >I know that you didn't ask for it, but I'd like to voice a
: >strong vote of "yea" for (at least) teaching our patch to
: >handle the "\no new line" in diffs.
:
: I'm willing to ask for any votes of "yea". It's the votes
: of "nay" that I'm not asking for... :-)
My plans had always been to back out Green's change (with Green's
permission, btw) when there was a patch that could grok things. The
back out wouldn't be MFC'd until after at least one release. Since
this was historical FreeBSD behavior, and modern patches grok the end
of line things, I see this as a no brainer: just do it once patch is
patched :-)
Warner
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message |
|
| Back to top |
|
 |
Brian F. Feldman *nix forums beginner
Joined: 22 Mar 2002
Posts: 27
|
Posted: Fri Apr 26, 2002 6:19 pm Post subject:
Re: diff & patch problem with 'No newline'
|
|
|
"M. Warner Losh" <imp@village.org> wrote:
| Quote: | In message: <p0511171bb8ef272024ba@[128.113.24.47]
Garance A Drosihn <drosih@rpi.edu> writes:
: At 9:07 PM +1000 4/26/02, Andrew Reilly wrote:
: >On Fri, 2002-04-26 at 14:12, Garance A Drosihn wrote:
: >> So, that's my pitch. I feel fairly strongly that there is a
: >> real advantage in following the lead of Linux (+anyone using
: > > gnu-diff) and NetBSD in this matter.
:
: >I know that you didn't ask for it, but I'd like to voice a
: >strong vote of "yea" for (at least) teaching our patch to
: >handle the "\no new line" in diffs.
:
: I'm willing to ask for any votes of "yea". It's the votes
: of "nay" that I'm not asking for... :-)
My plans had always been to back out Green's change (with Green's
permission, btw) when there was a patch that could grok things. The
back out wouldn't be MFC'd until after at least one release. Since
this was historical FreeBSD behavior, and modern patches grok the end
of line things, I see this as a no brainer: just do it once patch is
patched
|
So, as a solution for unbreaking old machines which won't understand what to
do with those patch files (as largely demonstrated by the ports, of course),
should there be a port for a "new" version of patch which the ports system
can depend upon and use instead of the base system's patch? I can see this
mattering because people are very comfortable running releases from several
years ago.
--
Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\
<> green@FreeBSD.org <> bfeldman@tislabs.com \ The Power to Serve! \
Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message |
|
| Back to top |
|
 |
Brian F. Feldman *nix forums beginner
Joined: 22 Mar 2002
Posts: 27
|
Posted: Fri Apr 26, 2002 6:34 pm Post subject:
Re: diff & patch problem with 'No newline'
|
|
|
"M. Warner Losh" <imp@village.org> wrote:
| Quote: | In message: <200204262019.g3QKJSs87524@green.bikeshed.org
"Brian F. Feldman" <green@FreeBSD.ORG> writes:
: So, as a solution for unbreaking old machines which won't understand what to
: do with those patch files (as largely demonstrated by the ports, of course),
: should there be a port for a "new" version of patch which the ports system
: can depend upon and use instead of the base system's patch? I can see this
: mattering because people are very comfortable running releases from several
: years ago.
That's a problem for ports people to deal with They routinely
have stuff like this.
I think we should MFC the patch changes for 4.6, but wait for the diff
changes for 4.7 so that we have a patch that can grok the stuff for at
least three months before we have a diff in -stable that will generate
them.
|
Okay, I didn't know if the plans changed to being to update both patch and
diff at the same time before 4.6! Since they didn't, I remain happified.
--
Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\
<> green@FreeBSD.org <> bfeldman@tislabs.com \ The Power to Serve! \
Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message |
|
| Back to top |
|
 |
Alfred Perlstein *nix forums addict
Joined: 19 Mar 2002
Posts: 67
|
Posted: Fri Apr 26, 2002 6:35 pm Post subject:
Re: diff & patch problem with 'No newline'
|
|
|
* Brian F. Feldman <green@FreeBSD.ORG> [020426 13:19] wrote:
| Quote: |
So, as a solution for unbreaking old machines which won't understand what to
do with those patch files (as largely demonstrated by the ports, of course),
should there be a port for a "new" version of patch which the ports system
can depend upon and use instead of the base system's patch? I can see this
mattering because people are very comfortable running releases from several
years ago.
|
I think the way bzip2 is handled might work.
--
-Alfred Perlstein [alfred@freebsd.org]
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'
Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message |
|
| Back to top |
|
 |
M. Warner Losh *nix forums Guru
Joined: 22 Mar 2002
Posts: 365
|
Posted: Fri Apr 26, 2002 8:22 pm Post subject:
Re: diff & patch problem with 'No newline'
|
|
|
In message: <200204262019.g3QKJSs87524@green.bikeshed.org>
"Brian F. Feldman" <green@FreeBSD.ORG> writes:
: So, as a solution for unbreaking old machines which won't understand what to
: do with those patch files (as largely demonstrated by the ports, of course),
: should there be a port for a "new" version of patch which the ports system
: can depend upon and use instead of the base system's patch? I can see this
: mattering because people are very comfortable running releases from several
: years ago.
That's a problem for ports people to deal with They routinely
have stuff like this.
I think we should MFC the patch changes for 4.6, but wait for the diff
changes for 4.7 so that we have a patch that can grok the stuff for at
least three months before we have a diff in -stable that will generate
them.
Warner
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message |
|
| Back to top |
|
 |
Bill Fenner *nix forums beginner
Joined: 21 Apr 2002
Posts: 13
|
Posted: Thu May 02, 2002 4:37 pm Post subject:
Re: savcore dump names?
|
|
|
Other useful pieces of functionality that savecore lost:
- The ability to not save a dump if:
- It would completely fill up the disk (and warn if it would cause disk
usage to go above 100%)
- It would exceed the administrator's configured free space (i.e.
/var/crash/minfree)
- Logging to syslog; errors and messages from the new savecore
are likely to get lost. I liked having things like
Feb 11 23:19:45 stash savecore: reboot after panic: bremfree: bp 0xc302523c not locked
Feb 11 23:19:46 stash savecore: no dump, not enough free space on device (86040 available, need 102328)
in /var/log/messages.
There was a patch to restore the "vmcore.N" functionality posted to
-current on April 18th, and a couple of followups. I haven't tried it
yet since the other two lost features are much more important to me.
Bill
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message |
|
| Back to top |
|
 |
Dag-Erling Smorgrav *nix forums Guru Wannabe
Joined: 23 Mar 2002
Posts: 110
|
Posted: Thu May 02, 2002 7:07 pm Post subject:
Re: savcore dump names?
|
|
|
Bill Fenner <fenner@research.att.com> writes:
| Quote: | - The ability to not save a dump if:
- It would completely fill up the disk (and warn if it would cause disk
usage to go above 100%)
- It would exceed the administrator's configured free space (i.e.
/var/crash/minfree)
- Logging to syslog; errors and messages from the new savecore
are likely to get lost. I liked having things like
|
- Writing sparse files (you think I *enjoy* 640-meg core dumps?)
DES
--
Dag-Erling Smorgrav - des@ofug.org
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Tue Dec 02, 2008 6:42 am | All times are GMT
|
|
Fighting Videos | Agencia de turismo | Personal Loans | Magic The Gathering Cards | Pink Ranger
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|