
65 B.R. 711 (1986)
In re COORDINATED FINANCIAL PLANNING CORPORATION, a California Corporation, Debtor(s).
Richard STEFFAN, trustee for Coordinated Financial Planning Corporation, Appellant(s),
v.
Thomas G. McMILLAN and Johhny Ribeiro, Appellee(s).
BAP No. EC-85-1219-AsVE, Bankruptcy No. 285-00639-W-11.
United States Bankruptcy Appellate Panels of the Ninth Circuit.
Argued and Submitted January 23, 1986.
Decided September 16, 1986.
Lawrence B. Dashiell, Carol D. Mills, Russell, Jarvis, Estabrook & Dashiell, Sacramento, Cal., for appellants.
R. Dale Ginter, Weintraub, Genshlea, Hardy, Erich & Brown, Sacramento, Cal., for appellee(s).
Before ASHLAND, VOLINN and ELLIOTT, Bankruptcy Judges.


*712 OPINION
ASHLAND, Bankruptcy Judge.
The trustee challenges the conclusion of the bankruptcy court that a right of first refusal for the purchase of real property is a covenant running with the land and is not subject to rejection as an executory contract pursuant to 11 U.S.C. § 365.

FACTS
Ronald and Krystyn Morrow (Morrows) were the principal shareholders of debtor Coordinated Financial Planning Co. (CFP). Ronald Morrow was CFP's president.
In 1983 the Morrows purchased the West Butte Duck Club for three million dollars with one million dollars from appellees McMillan and Ribeiro. The grant deed conveying title to the Morrows was recorded January 12, 1984.
For their contribution of one million dollars, appellees received a grant deed of an undivided 50% interest in the Club and certain covenants, conditions and restrictions as contained in an "Ownership Agreement" and "Agreement". The agreements and a memorandum of ownership agreement pertaining to real property were executed January 12, 1984. The grant deed to appellees was recorded January 12, 1985, and the memorandum of ownership agreement was recorded January 17, 1984.
The ownership agreement established a mutual right of first refusal/option to purchase between the parties. The ownership agreement required that if either party desired to sell his interest he must notify the other party of the proposed sale and extend the same terms.
The Morrows subsequently transferred their 50% interest into a family trust, and on February 15, 1985 the trust conveyed the interest to the debtor.
On February 21, 1985 CFP filed a Chapter 11 petition. The case was converted to Chapter 7 on August 5, 1985.
On May 30, 1985 the trustee filed a motion for authority to reject as executory the right of first refusal under § 365. The court denied the motion finding the option to be a covenant running with the land binding upon the debtor and the trustee as his successor in interest.

ISSUE
Whether a right of first refusal for the purchase of real property is subject to rejection as an executory contract pursuant to 11 U.S.C. § 365.

DISCUSSION
The right of first refusal between the parties is properly classified as a preemption agreement. The preemption agreement gives the appellees the first right to buy when and if appellants want to sell. See Rollins v. Stokes, 123 Cal.App.3d 701, 176 Cal.Rptr. 835 (1981), 1 Witkin, Summary of Cal.Law (8th Ed.1973) § 131, pp. 127-128.
In California, preemption agreements are consistently found to be covenants running with the land. In the early case of Laffan v. Naglee, 9 Cal. 662 (1858) at 678, the court stated: "the preemptive right of purchase [contained in a lease] constituted an essential part of the lease itself, and, therefore, ran with the land."
Covenants are promises to do or refrain from doing certain things relating to the use of land. Here the parties covenanted not to sell the property to third persons without first extending the same offer to the parties to the agreement. Covenants are not a property interest but are viewed as physically attached to the land. 3 Witkin, Summary of Cal.Law (8th Ed.1973) § 384. They are enforceable against successors in interest.
California Civil Code § 1468 provides that covenants to do or refrain from doing some act are created when four requirements are met:
"(a) The land of the covenantor which is to be affected by such covenants, and the land of the covenantee to be benefited, *713 are particularly described in the instrument containing such covenants;
(b) Such successive owners of the land are in such instrument expressed to be bound thereby for the benefit of the land owned by, granted by, or granted to the covenantee;
(c) Each such act relates to the use, repair maintenance or improvement of, or payment of taxes and assessments on, such land or some part thereof, or if the land owned by or granted to each consists of undivided interests in the same parcel or parcels, the suspension of the right of partition or sale in lieu of partition for a period which is reasonable in relation to the purpose of the covenant; and
(d) The instrument containing such covenants is recorded in the office of the recorder of each county in which such land or some part thereof is situated."
The covenant readily fulfills three requirements. The land is particularly described. The covenant specifically states that assignees are bound. The memorandum of ownership agreement is recorded and incorporates by reference the covenant which gives constructive notice to all parties. Calvi v. Bittner, 198 Cal.App.2d 312, 17 Cal.Rptr. 850 (1961).
Appellants contend that the preemption right is not within the purview of subsection (c). The subsection is the statutory codification of the common law touch and concern requirement. Preemption rights have been found to relate to the use of land. Richardson v. Callahan, 213 Cal. 683, 3 P.2d 927 (1931).
The parties agreement meets all the conditions of Cal.Civil Code § 1468 and, therefore, is a covenant running with the land.

II
Ordinary principles of contract law are also applicable. Property principles are involved, but in this case, they merely operate to bind a non-contracting party to a covenant. Once a running covenant is established it is enforced according to contract principles. And once a bankruptcy is filed Federal law comes into play.
For purposes of § 365 executory contracts are defined under federal, not state law. In re Alexander, 670 F.2d 885 (9th Cir.1982). Executory contracts are those in which the obligations of both parties are so far unperformed that the failure of either party to complete performance would constitute a material breach excusing the performance of the other. Countryman, Executory Contract in Bankruptcy, 57 Minn.L.R. 439, 460 (1973).
In In re Waldron, 36 B.R. 633 (Bankr.S.D.Fla.1984), the court held a recorded option contract to purchase real property could be rejected as an executory contract under § 365. Reversed, 785 F.2d 936 (11th Cir 1986) on grounds that use of a Chapter 13 for the purpose of rejecting an executory contract was an act of bad faith.
We agree with the bankruptcy court's holding in Waldron. The right of first refusal is an executory contract and is subject to rejection.

III
The bankruptcy code defines the rights of a party upon rejection of an executory contract. Section 365 permits a claim for damages for the breach as of the time of filing the case.
When an executory contract for the purchase of land is rejected, § 365(j) grants a purchaser not yet in possession a lien on the real property to the extent any money has been paid. To the extent the appellees have paid any money for the preemption agreement they should be given a lien for that amount.
A lien is a charge imposed upon specific property by which it is made security for the performance of an act. Cal.Civ. Code § 2872 (West 1985). Whether an agreement creates a lien depends on applicable state law. Butner v. United States, 440 U.S. 48, 99 S.Ct. 914, 59 L.Ed.2d 136 (1979). Liens are created by contract or by *714 operation of law. Cal.Civil Code § 2881 (West 1985). Courts can declare the existence of an equitable lien to do justice and equity and to avoid unfair results.
To create an equitable lien the court looks primarily to the intent of the parties. "[E]very express executory agreement in writing, whereby the contracting party sufficiently indicates an intention to make some particular property, real or personal, . . ., a security for a debt or other obligation . . . creates an equitable lien upon the property. . . ." Coast Bank v. Minderhout, 61 Cal.2d 311, 38 Cal.Rptr. 505, 392 P.2d 265 (1964).
Although the parties intent to restrict the use of the property is clear the agreement did not create a security interest. The restriction of the use of property by a right of first refusal is not an obligation within the meaning of a security against real property. The agreement did not hypothecate the property as security for the obligation of offering the right of first refusal.

CONCLUSION
The preemption agreement between the Morrows and appellees did not create a lien. The agreement is a covenant running with the land and an executory contract which can be rejected by the trustee pursuant to § 365. The trial court is instructed to permit rejection by the trustee and impose a lien on the property for any consideration paid for the preemption agreement by appellees. REVERSED and REMANDED.
