# freebsd-update vs csup



## dbi (May 21, 2010)

Hi,

I've noticed inconsistency between freebsd-update and csup.

```
root@bsd ~ # freebsd-update fetch install
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching public key from update5.FreeBSD.org... done.
Fetching metadata signature for 8.0-RELEASE from update5.FreeBSD.org... done.
Fetching metadata index... done.
Fetching 2 metadata files... done.
Inspecting system... done.
Preparing to download files... done.
Fetching 11 files... done.

The following files will be updated as part of updating to 8.0-RELEASE-p2:
/usr/src/etc/mtree/BSD.var.dist
/usr/src/libexec/rtld-elf/rtld.c
/usr/src/sys/cddl/compat/opensolaris/sys/vnode.h
/usr/src/sys/conf/newvers.sh
/usr/src/sys/kern/vfs_lookup.c
/usr/src/sys/netinet/ip_mroute.c
/usr/src/sys/netinet/raw_ip.c
/usr/src/sys/netinet/sctp_input.c
/usr/src/sys/netinet6/raw_ip6.c
/usr/src/sys/rpc/clnt_vc.c
/usr/src/usr.sbin/freebsd-update/freebsd-update.sh
Installing updates... done.
root@bsd ~ # csup /root/standard-supfile
Connected to 63.87.62.77
Updating collection src-all/cvs
 Checkout src/etc/mtree/BSD.var.dist
 Checkout src/libexec/rtld-elf/rtld.c
 Checkout src/sys/cddl/compat/opensolaris/sys/vnode.h
 Checkout src/sys/conf/newvers.sh
 Checkout src/sys/kern/vfs_lookup.c
 Checkout src/sys/netinet/ip_mroute.c
 Checkout src/sys/netinet/raw_ip.c
 Checkout src/sys/netinet/sctp_input.c
 Checkout src/sys/netinet6/raw_ip6.c
 Checkout src/sys/rpc/clnt_vc.c
 Checkout src/usr.sbin/freebsd-update/freebsd-update.sh
Finished successfully
root@bsd ~ #
```

Why is that?


----------



## mix_room (May 21, 2010)

One is a binary update, while the other is an update of the source. 

For the two to be identical the binary update would have to be rebuilt each time there was a change to the source.


----------



## SirDice (May 21, 2010)

The standard-supfile updates your source tree to -STABLE.


----------



## dbi (May 21, 2010)

*more confusion?*



			
				SirDice said:
			
		

> The standard-supfile updates your source tree to -STABLE.





The manual [1] reads:



> RELENG_8
> 
> The line of development for FreeBSD-8.X, also known as FreeBSD 8-STABLE
> 
> ...





```
root@bsd ~ # grep tag  /usr/share/examples/cvsup/standard-supfile      
*default release=cvs tag=RELENG_8_0
root@bsd ~ #
```


I have only changed only the following 2 lines:



```
root@bsd ~ # diff -ru0Bw {/usr/share/examples/cvsup/,}standard-supfile
--- /usr/share/examples/cvsup/standard-supfile  2009-11-21 16:30:44.000000000 +0200
+++ standard-supfile    2010-05-21 13:35:40.000000000 +0300
@@ -49 +49 @@
-*default host=CHANGE_THIS.FreeBSD.org
+*default host=cvsup11.FreeBSD.org
@@ -58 +58 @@
-*default compress
+# *default compress
```




[1] http://www.freebsd.org/doc/handbook/cvs-tags.html


----------



## SirDice (May 21, 2010)

dbi said:
			
		

> ```
> root@bsd ~ # grep tag  /usr/share/examples/cvsup/standard-supfile
> *default release=cvs tag=RELENG_8_0
> root@bsd ~ #
> ```


Your example file isn't standard anymore:

```
dice@maelcum:~>grep tag /usr/share/examples/cvsup/standard-supfile
*default release=cvs tag=RELENG_8
```

You're supposed to _copy_ the example and modify the copy.


----------



## ohauer (May 21, 2010)

I guess you mean even after a freebsd-update csup will fetch the same source files.

This is easily explained.
The sec team which builds the freebsd-updates do use the same files for building the updates, but they differ in the '$FreeBSD: ...' line.

You can check this with the following steps.
(file names/timestamps will be different for you since I do the steps with a different FreeBSD version)

```
[CMD="#"]cd /var/db/freebsd-update[/CMD]
[CMD="#"]ls -l[/CMD]
lrwxr-xr-x  1 root  wheel    14 Jan  8 10:21 f465c3739385890c221dff1a05e578c6cae0d0430e46996d319db7439f884336-rollback@ -> install.yl1cyw
drwxr-xr-x  2 root  wheel  3584 Jan  8 10:21 files/
drwx------  2 root  wheel   512 Jan  8 10:21 install.yl1cyw/
-rw-r--r--  1 root  wheel   800 Jun 10  2009 pub.ssl
-rw-r--r--  1 root  wheel    75 Jan 13 06:59 serverlist
-rw-r--r--  1 root  wheel    75 Jan 13 06:59 serverlist_full
-rw-r--r--  1 root  wheel    25 Jan 13 06:59 serverlist_tried
-rw-r--r--  1 root  wheel   150 Jan 13 06:59 tINDEX.present
-rw-r--r--  1 root  wheel   110 Jan 13 06:59 tag

[CMD="#"]grep newvers.sh install.yl1cyw/INDEX-NEW[/CMD]
[color="Red"]/usr/src/sys/conf/newvers.sh[/color]|f|0|0|0644|0|[color="Blue"]bb4b4170b1c7dbbedc5329c51b59f97e768d4884b3825d9589bc9dfed5e13b3d[/color]|

[CMD="#"]gzcat files/[color="Blue"]bb4b4170b1c7dbbedc5329c51b59f97e768d4884b3825d9589bc9dfed5e13b3d[/color].gz > /tmp/freebsd-update_newver.sh[/CMD]

(your output will be similar to this)
[CMD="#"]diff -u /tmp/freebsd-update_newver.sh /usr/src/sys/conf/newvers.sh[/CMD]
-# $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/conf/newvers.sh,v 1.83.2.6.2.4 2009/12/03 12:59:39 simon Exp $
+# $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/conf/newvers.sh,v 1.83.2.6.2.5 2010/01/06 21:45:30 simon Exp $
```

I hope this helps.


----------



## dennylin93 (May 21, 2010)

SirDice said:
			
		

> Your example file isn't standard anymore:
> 
> ```
> dice@maelcum:~>grep tag /usr/share/examples/cvsup/standard-supfile
> ...



I believe the standard-supfile varies according to the version your using:

```
[dennylin93@cnmc ~]> uname -a
FreeBSD cnmc.tw 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #0: Thu Jan  7 15:21:05 CST 2010     root@cnmc.tw:/usr/obj/usr/src/sys/CNMC  amd64
[dennylin93@cnmc ~]> grep tag /usr/share/examples/cvsup/standard-supfile
*default release=cvs tag=RELENG_8_0
```


```
[dennylin93@bsd ~]> uname -a
FreeBSD bsd 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Sat May 15 23:12:19 CST 2010     root@bsd:/usr/obj/usr/src/sys/BSD  i386
[dennylin93@bsd ~]> grep tag /usr/share/examples/cvsup/standard-supfile
*default release=cvs tag=.
```


----------



## dbi (May 21, 2010)

On amd64 it reads "RELENG_8_0"


```
cd system/amd64/8.0-RELEASE/base
 # export DESTDIR=/tmp/extr
 # mkdir $DESTDIR
 # ./install.sh 
You are about to extract the base distribution into /tmp/extr - are you SURE
you want to do this over your installed system (y/n)? y
 # grep tag  ${DESTDIR}/usr/share/examples/cvsup/standard-supfile 
*default release=cvs tag=RELENG_8_0
 #
```

Anyway, I'm using the RELENG_8_0 tag, so the original question still remains: why freebsd-update and csup don't agree on file versions?


*Addition #1:* while checking the tag from the original standard-supfile, two new replies appeared. I'll check if the difference is only in the "$FreeBSD..." comment line, but then, why only a few files would differentiate while the rest would be the same. Funny thing.


*Addition #2:*
Now I can confirm, that the files in question differ only in the header line.


```
--- /usr/src/etc/mtree/BSD.var.dist     2009-12-03 11:18:40.000000000 +0200
+++ BSD.var.dist        2010-05-21 18:54:21.000000000 +0300
@@ -1 +1 @@
-# $FreeBSD: src/etc/mtree/BSD.var.dist,v 1.75.10.1.2.2 2009/12/03 09:18:40 cperciva Exp $
+# $FreeBSD: src/etc/mtree/BSD.var.dist,v 1.75.10.1.2.1 2009/10/25 01:10:29 kensmith Exp $
--- /usr/src/libexec/rtld-elf/rtld.c    2009-12-03 11:18:40.000000000 +0200
+++ rtld.c      2010-05-21 18:54:21.000000000 +0300
@@ -26 +26 @@
- * $FreeBSD: src/libexec/rtld-elf/rtld.c,v 1.139.2.2.2.2 2009/12/03 09:18:40 cperciva Exp $
+ * $FreeBSD: src/libexec/rtld-elf/rtld.c,v 1.139.2.2.2.1 2009/10/25 01:10:29 kensmith Exp $
--- /usr/src/sys/cddl/compat/opensolaris/sys/vnode.h    2010-01-06 23:45:30.000000000 +0200
+++ vnode.h     2010-05-21 18:54:21.000000000 +0300
@@ -26 +26 @@
- * $FreeBSD: src/sys/cddl/compat/opensolaris/sys/vnode.h,v 1.12.2.2.2.2 2010/01/06 21:45:30 simon Exp $
+ * $FreeBSD: src/sys/cddl/compat/opensolaris/sys/vnode.h,v 1.12.2.2.2.1 2009/10/25 01:10:29 kensmith Exp
 $
--- /usr/src/sys/conf/newvers.sh        2010-01-06 23:45:30.000000000 +0200
+++ newvers.sh  2010-05-21 18:54:21.000000000 +0300
@@ -31 +31 @@
-# $FreeBSD: src/sys/conf/newvers.sh,v 1.83.2.6.2.5 2010/01/06 21:45:30 simon Exp $
+# $FreeBSD: src/sys/conf/newvers.sh,v 1.83.2.6.2.3 2009/11/20 15:55:23 kensmith Exp $
--- /usr/src/sys/kern/vfs_lookup.c      2010-01-06 23:45:30.000000000 +0200
+++ vfs_lookup.c        2010-05-21 18:54:21.000000000 +0300
@@ -38 +38 @@
-__FBSDID("$FreeBSD: src/sys/kern/vfs_lookup.c,v 1.132.2.1.2.2 2010/01/06 21:45:30 simon Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/vfs_lookup.c,v 1.132.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $");
--- /usr/src/sys/netinet/ip_mroute.c    2010-01-06 23:45:30.000000000 +0200
+++ ip_mroute.c 2010-05-21 18:54:21.000000000 +0300
@@ -70 +70 @@
-__FBSDID("$FreeBSD: src/sys/netinet/ip_mroute.c,v 1.155.2.1.2.2 2010/01/06 21:45:30 simon Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/ip_mroute.c,v 1.155.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $");
--- /usr/src/sys/netinet/raw_ip.c       2010-01-06 23:45:30.000000000 +0200
+++ raw_ip.c    2010-05-21 18:54:21.000000000 +0300
@@ -34 +34 @@
-__FBSDID("$FreeBSD: src/sys/netinet/raw_ip.c,v 1.220.2.2.2.2 2010/01/06 21:45:30 simon Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/raw_ip.c,v 1.220.2.2.2.1 2009/10/25 01:10:29 kensmith Exp $");
--- /usr/src/sys/netinet/sctp_input.c   2010-01-06 23:45:30.000000000 +0200
+++ sctp_input.c        2010-05-21 18:54:21.000000000 +0300
@@ -34 +34 @@
-__FBSDID("$FreeBSD: src/sys/netinet/sctp_input.c,v 1.82.2.2.2.2 2010/01/06 21:45:30 simon Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/sctp_input.c,v 1.82.2.2.2.1 2009/10/25 01:10:29 kensmith Exp $");
--- /usr/src/sys/netinet6/raw_ip6.c     2010-01-06 23:45:30.000000000 +0200
+++ raw_ip6.c   2010-05-21 18:54:21.000000000 +0300
@@ -63 +63 @@
-__FBSDID("$FreeBSD: src/sys/netinet6/raw_ip6.c,v 1.111.2.1.2.2 2010/01/06 21:45:30 simon Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet6/raw_ip6.c,v 1.111.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $");
--- /usr/src/sys/rpc/clnt_vc.c  2010-01-06 23:45:30.000000000 +0200
+++ clnt_vc.c   2010-05-21 18:54:21.000000000 +0300
@@ -38 +38 @@
-__FBSDID("$FreeBSD: src/sys/rpc/clnt_vc.c,v 1.8.2.2.2.2 2010/01/06 21:45:30 simon Exp $");
+__FBSDID("$FreeBSD: src/sys/rpc/clnt_vc.c,v 1.8.2.2.2.1 2009/10/25 01:10:29 kensmith Exp $");
--- /usr/src/usr.sbin/freebsd-update/freebsd-update.sh  2009-12-03 11:18:40.000000000 +0200
+++ freebsd-update.sh   2010-05-21 18:54:21.000000000 +0300
@@ -28 +28 @@
-# $FreeBSD: src/usr.sbin/freebsd-update/freebsd-update.sh,v 1.16.2.2.2.2 2009/12/03 09:18:40 cperciva Ex
p $
+# $FreeBSD: src/usr.sbin/freebsd-update/freebsd-update.sh,v 1.16.2.2.2.1 2009/10/25 01:10:29 kensmith Ex
p $
```


----------

