Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

/etc/rpc-release should have a linefeed at the end of the file #938

Open
breu opened this issue Apr 21, 2014 · 15 comments
Open

/etc/rpc-release should have a linefeed at the end of the file #938

breu opened this issue Apr 21, 2014 · 15 comments

Comments

@breu
Copy link
Contributor

breu commented Apr 21, 2014

No description provided.

@claco
Copy link
Contributor

claco commented Apr 21, 2014

Says who?

@breu
Copy link
Contributor Author

breu commented Apr 21, 2014

says me

@claco
Copy link
Contributor

claco commented Apr 21, 2014

No other distro release files do... hence why it does not.

@breu
Copy link
Contributor Author

breu commented Apr 21, 2014

/etc/redhat-release doesn't?

@claco
Copy link
Contributor

claco commented Apr 21, 2014

/etc/lsb-release /etc/os-release do not.

@breu
Copy link
Contributor Author

breu commented Apr 21, 2014

@claco ummm - it does too.

@claco
Copy link
Contributor

claco commented Apr 21, 2014

sure does not on my 12.04 install.

@breu
Copy link
Contributor Author

breu commented Apr 21, 2014

root@breu-ubuntu-havana-ha-neutron-n1:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="12.04.4 LTS, Precise Pangolin"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu precise (12.04.4 LTS)"
VERSION_ID="12.04"
root@breu-ubuntu-havana-ha-neutron-n1:~#
root@breu-ubuntu-havana-ha-neutron-n1:~# cat /etc/rpc-release
4.2.0root@breu-ubuntu-havana-ha-neutron-n1:~#

@claco
Copy link
Contributor

claco commented Apr 21, 2014

opened in stock vi. No line feed.

@breu
Copy link
Contributor Author

breu commented Apr 21, 2014

vi /etc/rpc-release

"/etc/rpc-release" [Incomplete last line] 1 line, 5 characters

@breu
Copy link
Contributor Author

breu commented Apr 21, 2014

here is some more information

root@breu-ubuntu-havana-ha-neutron-n1:/etc# cat rpc-release
4.2.0
root@breu-ubuntu-havana-ha-neutron-n1:/etc# cat rpc-release.old
4.2.0root@breu-ubuntu-havana-ha-neutron-n1:/etc# diff rpc-release rpc-release.old
1c1
< 4.2.0
---
> 4.2.0
\ No newline at end of file
root@breu-ubuntu-havana-ha-neutron-n1:/etc# hex^C
root@breu-ubuntu-havana-ha-neutron-n1:/etc# cat rpc-release
4.2.0
root@breu-ubuntu-havana-ha-neutron-n1:/etc# cat rpc-release.old
4.2.0root@breu-ubuntu-havana-ha-neutron-n1:/etc# diff rpc-release.old rpc-release
1c1
< 4.2.0
\ No newline at end of file
---
> 4.2.0
root@breu-ubuntu-havana-ha-neutron-n1:/etc# hexdump rpc-release
0000000 2e34 2e32 0a30
0000006
root@breu-ubuntu-havana-ha-neutron-n1:/etc# hexdump rpc-release.old
0000000 2e34 2e32 0030
0000005
root@breu-ubuntu-havana-ha-neutron-n1:/etc#

@breu breu changed the title /etc/rpc-release should have a newline at the end of the line /etc/rpc-release should have a newline at the end of the file Apr 21, 2014
@claco
Copy link
Contributor

claco commented Apr 21, 2014

Then it's a problem with https://github.com/rcbops-cookbooks/osops-utils/blob/master/recipes/version.rb#L22

hexdump /etc/os-release
0000000 414e 454d 223d 6255 6e75 7574 0a22 4556
0000010 5352 4f49 3d4e 3122 2e32 3430 332e 4c20
0000020 5354 202c 7250 6365 7369 2065 6150 676e
0000030 6c6f 6e69 0a22 4449 753d 7562 746e 0a75
0000040 4449 4c5f 4b49 3d45 6564 6962 6e61 500a
0000050 4552 5454 5f59 414e 454d 223d 6255 6e75
0000060 7574 7020 6572 6963 6573 2820 3231 302e
0000070 2e34 2033 544c 2953 0a22 4556 5352 4f49
0000080 5f4e 4449 223d 3231 302e 2234 000a
000008d
hexdump /etc/lsb-release
0000000 4944 5453 4952 5f42 4449 553d 7562 746e
0000010 0a75 4944 5453 4952 5f42 4552 454c 5341
0000020 3d45 3231 302e 0a34 4944 5453 4952 5f42
0000030 4f43 4544 414e 454d 703d 6572 6963 6573
0000040 440a 5349 5254 4249 445f 5345 5243 5049
0000050 4954 4e4f 223d 6255 6e75 7574 3120 2e32
0000060 3430 332e 4c20 5354 0a22
000006a
hexdump osops-utils/VERSION
0000000 2e34 2e32 0a32
0000006

We most certainly don't want a newline.

@breu
Copy link
Contributor Author

breu commented Apr 21, 2014

0x0a is your linefeed. That is present in the files you references, but not /etc/rpc-release

@breu breu changed the title /etc/rpc-release should have a newline at the end of the file /etc/rpc-release should have a linefeed at the end of the file Apr 21, 2014
@breu
Copy link
Contributor Author

breu commented Apr 21, 2014

edited title so it reflects a linefeed instead of a newline

@breu
Copy link
Contributor Author

breu commented Apr 21, 2014

@claco claco added this to the v4.2.3 milestone May 23, 2014
claco added a commit to claco/osops-utils that referenced this issue May 23, 2014
Unlike other release files in /etc, the rpc-release did not have a
proper line-feed at the end of the file.

- Change version recipe to add LF to /etc/rpc-release

Issue rcbops/chef-cookbooks#938
claco added a commit to claco/osops-utils that referenced this issue May 27, 2014
Unlike other release files in /etc, the rpc-release did not have a
proper line-feed at the end of the file.

- Change version recipe to add LF to /etc/rpc-release

Issue rcbops/chef-cookbooks#938

(cherry picked from commit af1beef)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants